View Full Version : PHP Detecting a Browser's URL
AD6XS
09-11-2002, 03:37 PM
I am curious if it is possible through PHP to access the URL of the user's browser. You know, the URL string the viewer of the website sees when they visit the particular page where I want to run a PHP script.
I want to access this and name it to a variable.
I have searched high and low all over th einternet and PHP manuals for this with NO LUCK!!! :mad:
Anyone know the solution. I am thinking that this may involve javascript also.
If anyone knows the solution please post here or email me.
Thanks.
Dynasty
09-15-2002, 09:55 PM
Whenever I use that it only returns /nameofscript.php
It's some weird stuff that is.
Dynasty
09-16-2002, 02:39 AM
That appears to return the same thing O_o
AD6XS
09-16-2002, 04:17 AM
Thanks guys, I will try it. ;)
Sam
noremac
09-28-2002, 05:47 PM
if all else fails the PHP manual is your friend :D. (http://www.php.net/manual/ )
joshie
09-03-2009, 06:41 AM
Use $_SERVER['SCRIPT_FILENAME'] to get the script name.
Use $_SERVER['REQUEST_URI'] to get the requested URI.
Hanratty
09-04-2009, 12:06 PM
It is not actually a redirect. I think what is happening is that the site is requesting the current page from my site. It then parses the page adding their table with 'The following search terms have been highlighted: search terms' and adding style="background-color: tags throughout my pages html. It then serves up this page on their site. I want to catch it when they first request the page so they do not get the html to alter.
Looking at my server logs it seems that the initial request for index.php does not have a referrer but the requests for the .css and images do.
----------------------------------------------------------------------------------------------------------
Read Texts Aloud (http://www.DriveSafe.ly)
maximmax
03-14-2010, 10:08 AM
after an exhaustive search through Google, I am no more enlightened then before. It seems a "post" needs to have an "action" parameter ie: "action=index.php". It seems to only be on the "add to cart" function after logging in that it fails. All of my IIS and PHP settings are correct and since I can not change the source to make this work I guess we will have to try something else. Thanks for your help.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.