I have this code to load external pages on my website:
<?php
function curl($url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
$url = 'http://rooster.csvincentvangogh.nl:8081';
$contents = curl($url);
echo $contents;
?>
It works for most sites, but not the one I need: http://rooster.csvincentvangogh.nl:8081
. Is this because of the :8081? It needs to be there though, otherwise the site doesn't work... How could I fix this? Is there an alternative way, in stead of curl?
I tested it on http://portquiz.net. Ports such as 80 and 8080 work, but e.g. 8888 and 8081 not. http://rooster.csvincentvangogh.nl:8080 works too, but that has different directories and not the pages I need. I really do need the pages on :8081...
Thanks in advance!