I am currently trying to curl a form with method=GET. I have the complete link with the data on the end of the url. If I place the link directly into the address bar it works. When I curl the link it gives me an "Object not found!" error and changes the address bar URL to http://localhost/ocs?name=mike.
I believe I have a similar problem to this question but I am unsure what the solution to this question was: Curl Redirect Problem
Code I currently have:
$ch = curl_init();
$url = "http://www.example.com/ocs?name=mike";
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$data = curl_exec ($ch);
curl_close ($ch);
echo $data;
Thank you very much for your help