$texturl = urlencode("http://". $SERVER['HTTP_HOST']. $SERVER['REQUEST_URI']);
Are they any alternatives to using the above code to encode the current page ?
I'm using the above code to form a url for a print format script. It requires the url of the current page to form the url for example :
http://www.phpbuilder.com/print.php?$texturl
which should then form
http://www.phpbuilder.com/print.php?http://www.phpbuilder.com
(but encoded)
The above code works fine on my test server (win2k latest php build with no restrictions like safe mode etc.) but when I try it live on my linux box (old php version but patched up, and with some security restrictions) it doesn't work and the url is blank ie.
http://www.phpbuilder.com/print.php?
If there are any alternative methods of achieving the same effect I'd love to know !
Thanks for any help you can offer me :-)