[PHP] Specifying file to send in url...

2002-11-15 Thread Tom Woody
I may be way off base on this, but is it possible to specify a filename on a url as in... The user types in http://server/script.php?filetosend=filename.txt The script.php recieves that file and processes accordingly? Because of the way its specified it would be a GET but I am not sure if this

Re: [PHP] Specifying file to send in url...

2002-11-15 Thread Marco Tabini
Sure you can do it, you can retrieve it in your code as $_GET['filetosend']. However, you have to be very careful with the user's input, as someone could pass malicious file names, like /etc/passwd, which you probably wouldn't want to disclose. So, unless you impose draconian restrictions and

Re: [PHP] Specifying file to send in url...

2002-11-15 Thread Jason Wong
On Saturday 16 November 2002 04:59, Tom Woody wrote: I may be way off base on this, but is it possible to specify a filename on a url as in... The user types in http://server/script.php?filetosend=filename.txt The script.php recieves that file and processes accordingly? Because of the way