magebash Posted February 10, 2008 Share Posted February 10, 2008 Is it possible in PHP or any other programming language to write the url of the last website you visited? If so, what is the code? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/90309-view-previous-page/ Share on other sites More sharing options...
p2grace Posted February 10, 2008 Share Posted February 10, 2008 You can grab the referring page with: $_SERVER['HTTP_REFERER']; Quote Link to comment https://forums.phpfreaks.com/topic/90309-view-previous-page/#findComment-463138 Share on other sites More sharing options...
maexus Posted February 10, 2008 Share Posted February 10, 2008 It should also be noted that some websites/servers will go out of their way to make sure no referer is sent. Quote Link to comment https://forums.phpfreaks.com/topic/90309-view-previous-page/#findComment-463280 Share on other sites More sharing options...
briant Posted February 10, 2008 Share Posted February 10, 2008 You could do a simple back link/button with javascript. As a link: <a href="#" onClick="history.go(-1)">Back</a> As a button: <input type=button value="Back" onClick="history.go(-1)"> Quote Link to comment https://forums.phpfreaks.com/topic/90309-view-previous-page/#findComment-463284 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.