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 its specified it would be a GET but I am not sure if this is
> even possible.

Do you mean you want to send a _local_ file called "filename.txt" to the 
_server_ via the URL? If so, then no, it's not possible.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
"The lymbic system in my brain is so electrically active, it qualifies
 as a third brain.  Normal humans have two brains, left and right.

- Jeff Merkey 
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




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 checks--or security is
not a concern... I suggest you think up a different mechanism :=)

Marco
-- 

php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers

Come visit us at http://www.phparch.com!

--- Begin Message ---
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 is
even possible.

Something tells me I have seen this done before but I am not sure. 
Thanks for any help on this.  I have done some Googling and Archive
search for something related and have come up blank.

-- 
Tom 

Don't throw your computer out the window, 
throw the Windows out of your computer! 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php