Forum Moderators: coopster

Message Too Old, No Replies

Curl question

         

orion_rus

7:37 pm on Dec 3, 2005 (gmt 0)

10+ Year Member



Hello world.
I want to ask question about curl.
I would like to get a page with already posted data.
I use such code.

$user_agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'http://www.sitecreator.ru/siteposition/siteposition.php');
curl_setopt ($ch, CURLOPT_POST, 1);
$string="отдых.ру";
$string=mb_convert_encoding($string,'windows-1251','koi8-r');

curl_setopt ($ch, CURLOPT_POSTFIELDS,'flagY=true&site=otdyh.ru&words='.$string);
curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
$store = curl_exec ($ch);
echo $store;

The store shows forms filled with curl. But id didn't show a result of this. May be somebody can help me?
Thank in advance!

orion_rus

10:01 pm on Dec 3, 2005 (gmt 0)

10+ Year Member



i get solution. Thanks.
Topic closed