tags:

views:

43

answers:

2

i am using http class and it stuck at setting up cookies on the line where it says fuction setcookies.

this is my code

require_once ('../http.php');
$http=new http_class;
$http->user_agent="Mozilla/5.0 (Intel Mac OS X) Gecko/20070515 Firefox/2.0.0.4";
$error=$http->GetRequestArguments($url,$arguments);

foreach ($cookie as $c) {
$t = explode('=',$c);                        
$http->SetCookie($t[0],$t[1],"","/",".example.com"); //problem is here i think
}

$arguments["Headers"]["Referer"] = $referer;
A: 

I assume you're getting an error because your script is running for too long. You can remove the limit this way:

 set_time_limit(0);

Also see http://php.net/set_time_limit for more information.

Daniel Egeberg
If the timeout is occurring in the code shown then there's something **very** wrong in the code or the config. Disabling the timeout DOES NOT SOLVE the problem.
symcbean
A: 

Can you provide the source for $http->SetCookie(...)? Why is it that you have a SetCookie method in your http_class class? The input parameter list looks exactly like the one for PHP's setcookie, so why not use that instead?

SHC