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 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']; 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. 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)"> Link to comment https://forums.phpfreaks.com/topic/90309-view-previous-page/#findComment-463284 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.