Hey,
The following code works on my local server, but not on my host. It's 'cause I use http/1.1 and my host uses http/1.0. When I execute following code in my host I get the following error:
error I get:
HTTP/1.0 302 Moved Temporarily
Object moved to here.
So this is 'cause of the http/1.O. So I thought off using curl_setopt($ch, CURLOPT_HTTP_VERSION, 'CURL_HTTP_VERSION_1_1');. But it still use http/1.0. I don't know where to put it or if it's correct. There is so little information about this tag.
Anyone any experience in changing the http version with php?
The One And Only KryptoS
The following code works on my local server, but not on my host. It's 'cause I use http/1.1 and my host uses http/1.0. When I execute following code in my host I get the following error:
Code:
curl_setopt($ch, CURLOPT_URL, "[URL unfurl="true"]http://collect.myspace.com/index.cfm?fuseaction=invite.addfriend_verify&friendID="[/URL] . $fid);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEFILE, 'tmp/cookie.txt');
curl_setopt($ch, CURLOPT_HTTPHEADER, $header_myspace_home);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
$pagecontents = curl_exec($ch);
echo $pagecontents;
error I get:
HTTP/1.0 302 Moved Temporarily
Object moved to here.
So this is 'cause of the http/1.O. So I thought off using curl_setopt($ch, CURLOPT_HTTP_VERSION, 'CURL_HTTP_VERSION_1_1');. But it still use http/1.0. I don't know where to put it or if it's correct. There is so little information about this tag.
Anyone any experience in changing the http version with php?
The One And Only KryptoS