{
$response=json_decode(file_get_contents('http://api.bit.ly/shorten?
version=2.0.1&longUrl='.$url.'&login='.$this->user.'&apiKey='.$this-
>api),TRUE);
return array('url' => $response['results'][$url]['shortUrl'], 'hash'
=> $response['results'][$url]['hash']);
}
This works on a machine, doesn't on another. Both have curl enabled
and allow_url_fopen set to 'on' and user_agent with no value.
The error is 'failed to open stream: HTTP request failed!'
How can I solve this? Thanks
it seems that you cannot solve this (that why you ask... ;-)
http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen
besides the 'allow_url_fopen' to 'on' check the other settings given
there...
--
Luuk
It also pre-supposes that the server can make outgoing DNS lookups and
HTTP connections.
C.