Hi everyone
I've look all other the web for a work around that.
basically my problem is:
if i use file_get_contents or curl to get www.google.fr, there is NO problem. i get the data i want
but when i try to use it on another target it doesn't work. it loads and loads for couple seconds and finally says that it could not retrieve informations.
the target is not blocked as i can personnally use it on my webhost, but some people on other webhosts can't.
A friend of mine told me that it was because some webhosts blocks unsecure targets.
Is there any way around it?
$context = stream_context_create(array(
'http' => array(
'header' => "Authorization: Basic " . base64_encode("admin:$password")
)
));
$data = file_get_contents("http://TARGETHOST:29015/status.json", false, $context);
$status = json_decode($data);
var_dump($status);
(And again this works on my webhost, i can query like that any servers i want, but others can't use this they get a timeout trying it (when doing a file_get_contents on google works))