Skip to content

Instantly share code, notes, and snippets.

@thebouv
Created February 18, 2014 18:38
Show Gist options
  • Save thebouv/9077001 to your computer and use it in GitHub Desktop.
Save thebouv/9077001 to your computer and use it in GitHub Desktop.
PHP POST proxy
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $REMOTEURLHERE);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($_POST));
$data = curl_exec($ch);
curl_close($ch);
?>
@thebouv
Copy link
Author

thebouv commented Feb 18, 2014

For forwarding POSTs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment