I am trying to make a CURL request to an IP address, however it just fails and I have no idea why. This is my code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"127.0.0.1/script.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "postdata=postdata&postdata1=postdata1");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close ($ch);
However it justs returns an empty result. Any suggestions here?