php - How grab filename from url? -


i write simple script vip user php. need change many (+4000) links format compilable script.

i need grab file name url's.

url e.x dw.example.com/download.php?d=blabla/blabla/2014/test.zip

url e.x dw.example.com/download.php?d=blabla/blabla/test.zip

the big problem files not in same path (directory), try use .htaccess rewrite url's dw.example.com/download.php?d=blabla/blabla&f=test.zip it's not work.

is there way resolve problem .htaccsess? if not, how can file name url type:

url e.x dw.example.com/download.php?d=blabla/blabla/2014/test.zip

thanks bor691 array_pop(explode('/',$url)) can grab file name.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -