Warning: file_get_contents(http://api.local.yahoo.com/MapsService/ ... =asdasdasd) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in
My fetch url portion is as below:
Code: Select all
<?php
function fetchURL($url) {
$aContext = array(
'http'=> array(
'proxy'=>'tcp://proxy.myproxy.com:8080',
'request_fulluri' => True,
),
);
$cxContext = stream_context_create($aContext);
if(!$content = file_get_contents($url,False,$cxContext)){
echo "Not valid";
//throw new CustomException('Unable to read file contents',self::FILE_DATA_ERROR);
}else
return $content;
}
?>