- file_get_contents: documentation ( source)
- error_log: documentation ( source)
- error_get_last: documentation ( source)
- http_build_query: documentation ( source)
<?php
$destination = 'http://badurl/';
$params = array();
$url = $destination . '?' . http_build_query($params);
$response = file_get_contents($url);
if($response === false)
{
$error = error_get_last();
error_log("!: {$error["message"]}");
}