curl-and-php
sending POST data to remote server
Date: Sun, 30 Nov 2008 20:53:23 +0100
Hi,
I have a problem with sending data to remote server. Actually, not to
every remote server so I want to ask if there are any conditions for
that remote server which have to be obey like that remote server have to
have switched on curl extension too or something like that. My source
code is :
$ch = curl_init("http://byt.sk/inzeraty-byty-predam.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_POST,TRUE);
$postData = array("_id_kraj"=>"100",
"_strPrev"=>"50",
"_strFrst"=>"0",
"_strNext"=>"150",
"_strLast"=>"11253",
"_btnNext"=>"+50+>+");
$post =
"_id_kraj=100&_strPrev=50&_strFrst=0&_strNext=150&_strLast=11255&_btnNext=+50+>5";
curl_setopt($ch, CURLOPT_POSTFIELDS,$post);
$result = curl_exec($ch);
echo $result;
Several names of variables are in Slovak, but it isn't importat what
they mean. When I execute it firebug shows me error "Permission denied
to call method
Location.toString". It doesn't show up when I try to send POST data to
my server where I'm sure that curl is installed.
Thanks,
elf
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-11-30