PHP RePOST data

user-pic
Vote 0 Votes

Recieve POST and RePOST data to somewhere. Similar to POST redirection.

$ch = curl_init('http://yourhost.com/post.php');
$postdata = file_get_contents("php://input");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);

About this Entry

This page contains a single entry by Pank published on May 23, 2014 4:12 PM.

Apache mod_bw was the previous entry in this blog.

ADB Sideload OTA ZIP is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives