cURL / Mailing Lists / curl-and-php / Single Mail


forwarding post requests

From: Yigit Ahmet <>
Date: Sun, 16 Sep 2007 01:23:16 +0300

hi there,

my country had blocked whole w"o"r"d"p"r"e"s" and it's subdomains. so,
i basically programmed a proxy site for only that site with curl. adress is
w"o"r"d"p"r"e"x" (without quotes of course, i dont want this to be
indexed.) but i'm having some problems with forwarding post variables. my
code is like this:

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $adres);
if ($_POST){
foreach ($_POST as $nedir => $degermi) $postedicem.=$nedir."=".$degermi."&";
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postedicem);
echo "Debug: $postedicem";
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
echo $ahmet;

if you can look at http://www.w"o"r"d"p"r"e"x" you can
see that nothing happens if you hit submit button, except a page reload. how
can i forward the values to original form?


Received on 2007-09-16