How to get file extension
Posted: Thu Feb 25, 2010 8:02 pm
Hello,
I'd like to know how you can get a file extension from a file stored in a url
===========================
For example:
file (john.txt) is stored in this url http://www.warehouse.com/manager/getperson.php?id=12345
If you click on that link it will give you the text file to download.
===========================
The thing is I'd like to know how can I get the extension out of that file (.txt)
file_put_content -> I can save the file ... but I won't know what's the extension
pathinfo() -> only give me the last 4 character in the link
Help please, thank you very much
I'd like to know how you can get a file extension from a file stored in a url
===========================
For example:
file (john.txt) is stored in this url http://www.warehouse.com/manager/getperson.php?id=12345
If you click on that link it will give you the text file to download.
===========================
The thing is I'd like to know how can I get the extension out of that file (.txt)
file_put_content -> I can save the file ... but I won't know what's the extension
pathinfo() -> only give me the last 4 character in the link
Help please, thank you very much