Page 1 of 1

curl error

Posted: Thu Nov 22, 2007 7:19 am
by beso4ever
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


when i used curl library to fetch the content of any page it is work well but another sits but another give me this error from fetched site 

eSense Page Implementation Problem

--------------------------------------------------------------------------------

Error: Disabled Cookies
More Information: Your browser seems to have the coockies disabled

Page Information: This problem is found in the code for the following page/component:pages/default.aspx

--------------------------------------------------------------------------------
eSense Webpage Implementation version 1.0 


this is my code"

Code: Select all

<?php
$all="http://anysite";
$ch = curl_init($all);
curl_setopt($ch , CURLOPT_BINARYTRANSFER , 1);
curl_setopt($ch , CURLOPT_RETURNTRANSFER , 1);
$data = curl_exec($ch);
curl_close($ch);
echo $data;
?>
and this is the header of fetched page

HTTP/1.0 200 OK Date: Thu, 22 Nov 2007 12:53:36 GMT Server: Microsoft-IIS/6.0 WebServerIP: 10.152.244.181 X-Powered-By: ASP.NET X-AspNet-Version: 1.1.4322 Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 1135 X-Cache: MISS Connection: close

please i need advice quickly


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Thu Nov 22, 2007 7:26 am
by John Cartwright
Take a look at

Code: Select all

curl_setopt('CURLOPT_COOKIEJAR', '/path/to/cookie');

Posted: Thu Nov 22, 2007 9:19 am
by beso4ever
thanks for ur replay

i used it as
curl_setopt($ch,CURLOPT_COOKIEJAR,­ '/path/to/cookie/file.txt');

and as

curl_setopt($ch,CURLOPT_COOKIEJAR,­ '/path/to/cookie');

and as

curl_setopt($ch,CURLOPT_COOKIEJAR,­ '/path/to/cookie.txt');

but same error

any another soluation plz