Hi,
I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a 404 error when i try and connect. How could i fix this.
Thanks,
matthew
I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a 404 error when i try and connect. How could i fix this.
Code:
$concurl = curl_init();
curl_setopt($concurl, CURLOPT_URL, "http://localhost/user-validation.php?somevalue=userid");
curl_setopt($concurl,CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($concurl);
curl_close($concurl);
echo $response;
Thanks,
matthew
Comment