[thelist] Passing URL as a GET variable

Joshua Olson joshua at waetech.com
Tue Oct 21 16:07:46 CDT 2003


----- Original Message ----- 
From: "Tony Grimes" <info at scribenewmedia.com>
Sent: Tuesday, October 21, 2003 3:26 PM


> This may be a stupid question, but is it alright to pass a URL or file
name
> as a GET variable? For example:
>
> http://www.example.com/some_script.php?location=http://www.somesite.com
> http://www.example.com/some_script.php?location=some_page.php
>
> Does this conform to spec? Are there any browsers that will get confused
by
> this?

You can pass those strings, but you must first encode the values.

Check out PHP's

urlencode function.

http://www.zend.com/manual/function.urlencode.php

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com
706.210.0168



More information about the thelist mailing list