I want to pull some html pice of code with some data from an external website with cURL, but a recived a null response. If I type the url in browser i get the data that i want but i need to do that from my app via cURL or file_get_contents();
This is my code :
$_awb = '888000074599';
$url = 'http://89.45.196.45';
$post_fields = ':8080/?id=8IM*8J*9K&NT='.$_awb;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
$result = curl_exec($ch);
curl_close($ch);