Hi everyone. I'm having some issues implementing a send to friend pop-up. The program completely works with one exception. On occasion the link which is retreived by and responsible for sending the link in a email...: <? $refurl = $_SERVER['HTTP_REFERER']; ?> <? print $refurl;?> is not always displaying to the users. The email comes out like this: ====================== USER has used your recommendation form using an email address of The people the recommendation has been submitted to are: The page recommended: ======================== As you can see the page recommended is BLANK! But other times the link is there? Could it be due to the fact too many people are using this form? I had quite a traffic surge yesterday but nothing too big. I got the script form hotscripts. Here is the file info if any of you want to look it up: // This following statement must not be changed. // Copyright (c) Michael Bloch and Taming The Beast. // Tell-A-Friend script V 2.1 Updated September 19 2006 // Taming the Beast.net - http://www.tamingthebeast.net // Free Web Marketing and Ecommerce Resources and Tools // By using this script you agree to indemnify Taming the Beast // from from any liability that might arise from its use. // The preceding statement must not be changed. Like I said I'm a noob. Is this sufficient info find out why it's not working or do you need the link to the site? Source code? Thanks for your patience and muchas gracias in advance!
Thanks for the response. I have to get the link from the page so the above <? $refurl = $_SERVER['HTTP_REFERER']; ?> <? print $refurl;?> is in the actual form. I then have another handler file that places the variable in the email and sends. Hope I've managed to explain myself better.
Some servers do not send the HTTP_REFERER information...so that could be your problem. Just to make sure, you know that the HTTP_REFERER will give you where the user is navigating to your site from.
Just attach a $_GET variable to the link (which points to the form) then read this variable, more reliable than trusting the browser to send the referer information. Dan
Like I said, sometimes it send other times it doesn't. If the server didn't send the http_referer it would not send it all the time not just every now and then. Any other ideas?
What sort of circumstances would have to happen for it to be a server problem? 'HTTP_REFERER' The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted. Code (markup): Off PHP.net...