Hey,
I have to following code
curl_setopt($ch , CURLOPT_URL,
"http://collect.myspace .com/index.cfm?fusea ction=invite.ad dfriend_verify& friendID="
.. $fid);
curl_setopt($ch , CURLOPT_HTTP_VE RSION, CURL_HTTP_VERSI ON_1_1);
curl_setopt($ch , CURLOPT_HEADER, 1);
curl_setopt($ch , CURLOPT_FOLLOWL OCATION, 0);
curl_setopt($ch , CURLOPT_RETURNT RANSFER, 1);
curl_setopt($ch , CURLOPT_COOKIEF ILE, 'cookie.txt');
curl_setopt($ch , CURLOPT_HTTPHEA DER, $header_myspace _home);
curl_setopt($ch , CURLOPT_USERAGE NT, $agent);
$pagecontents = curl_exec($ch);
This code works fine on my local webserver, and I also tested it on another
test server. But when I put it online on the real server it get a fault.
I did a little research and discovered the problem. But I don't know how I
can solve it.
On my local webserver and test server I receive (in the $pagecontents) html
header http/1.1. And everything works fine. But on my real server I receive
html header http/1.0 and "Object Removed". One way or the other this curl
syntax doesn't work with http/1.0.
I tried the option CURLOPT_HTTP_VE RSION with CURL_HTTP_VERSI ON_1_1 but still
it's not working.
Is there someone who know how I can work around this? Or how I can
manipulate it so that it works with http/1.1?
Greetings,
Wim
I have to following code
curl_setopt($ch , CURLOPT_URL,
"http://collect.myspace .com/index.cfm?fusea ction=invite.ad dfriend_verify& friendID="
.. $fid);
curl_setopt($ch , CURLOPT_HTTP_VE RSION, CURL_HTTP_VERSI ON_1_1);
curl_setopt($ch , CURLOPT_HEADER, 1);
curl_setopt($ch , CURLOPT_FOLLOWL OCATION, 0);
curl_setopt($ch , CURLOPT_RETURNT RANSFER, 1);
curl_setopt($ch , CURLOPT_COOKIEF ILE, 'cookie.txt');
curl_setopt($ch , CURLOPT_HTTPHEA DER, $header_myspace _home);
curl_setopt($ch , CURLOPT_USERAGE NT, $agent);
$pagecontents = curl_exec($ch);
This code works fine on my local webserver, and I also tested it on another
test server. But when I put it online on the real server it get a fault.
I did a little research and discovered the problem. But I don't know how I
can solve it.
On my local webserver and test server I receive (in the $pagecontents) html
header http/1.1. And everything works fine. But on my real server I receive
html header http/1.0 and "Object Removed". One way or the other this curl
syntax doesn't work with http/1.0.
I tried the option CURLOPT_HTTP_VE RSION with CURL_HTTP_VERSI ON_1_1 but still
it's not working.
Is there someone who know how I can work around this? Or how I can
manipulate it so that it works with http/1.1?
Greetings,
Wim
Comment