Obtenemos el fichero de dentro de la url
/**
* Obtenemos el fichero de dentro de la url
* @param string URL que se va a parsear
* @return string Devuelve el string con el fichero
*/
function get_url_file($url) {
if (empty($url) || !is_string($url)) {
return FALSE;
} else {
return implode('', array_slice(explode('/', parse_url($url, PHP_URL_PATH)), -1));
}
}
var_dump(get_url_file('https://truthman30.files.wordpress.com/2015/04/hello-picture.gif'));