domain.com/file.jpg file/file2/file.jpg folder/file.jpg http://www.site.com/file.jpg http://www.site.com/domain/file.jpg file.jpg
how can you return everything after the last /?
in this case, all strings would retrun file.jpg..
Something like this
$file = explode("/",$_SERVER[PHP_SELF]); $name = count($file)-1;
echo $file[$name];
http://au.php.net/manual/en/function.basename.php