curl error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
beso4ever
Forum Newbie
Posts: 10
Joined: Fri Jul 20, 2007 10:02 am

curl error

Post 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]
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Take a look at

Code: Select all

curl_setopt('CURLOPT_COOKIEJAR', '/path/to/cookie');
beso4ever
Forum Newbie
Posts: 10
Joined: Fri Jul 20, 2007 10:02 am

Post 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
Post Reply