dsjoes Posted March 24, 2011 Share Posted March 24, 2011 how do i get the url using the below? I have set up my error pages so that there is an iframe with a form on so the error can be reported but because i have the below on the iframe it gets the iframe url and not the url that produced the error. it is displaying this example.com/error/report.php but it should be this example.com/fake.php $requri = getenv ("REQUEST_URI"); $servname = getenv ("SERVER_NAME"); Quote Link to comment https://forums.phpfreaks.com/topic/231591-getting-url/ Share on other sites More sharing options...
MrXHellboy Posted March 24, 2011 Share Posted March 24, 2011 $_SERVER['HTTP_REFERER']; // = Visitor comes from http://google.nl/?search=blahblah for example Quote Link to comment https://forums.phpfreaks.com/topic/231591-getting-url/#findComment-1191699 Share on other sites More sharing options...
dsjoes Posted March 24, 2011 Author Share Posted March 24, 2011 thanks that works Quote Link to comment https://forums.phpfreaks.com/topic/231591-getting-url/#findComment-1191702 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.