Find previous URL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
matticus1181
Forum Newbie
Posts: 1
Joined: Tue Jun 28, 2005 7:59 am

Find previous URL

Post by matticus1181 »

My question may not be possible. I want to capture the url of the site a user was on before they came to my site...I'm not talking about using http_refer.. I have that.. I'm more talking about using the javascript function history(-1)....Now js is client side, and php is server, so is there anyway to get this to work? Thanks...
Critta
Forum Newbie
Posts: 8
Joined: Fri Jun 24, 2005 1:45 pm

Post by Critta »

You could pass the result of the javascript function in a POST/GET and then handle it with PHP.
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

Not sure if you have access to that information through javascript and cannot look it up at the moment. I do know that this information may stored in the weblog of your server.

Can you explain why you would want this information ?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

I sure hope my browser doesn't tell you that i'm coming from http://mybank.example?sessid=xxx
Post Reply