Click to See Complete Forum and Search --> : Paging pyro: re: refer.php
Daria
10-17-2003, 10:38 AM
I tried one of your php codes for link referral posted in this old thread (http://forums.webdeveloper.com/showthread.php?s=&postid=102238#post102238) , and found that if you do not enter "your name" "your email address", it does not deliver the message, yet, you get a "thank you" page. What gives? I mean, should there be a "sorry, you have not entered one of required fields" page, too?
Just a thought.
Wow... that is some old, old code... Rather embarrassing, really :D
This version is much better, and forces users to enter their friends email (as that is the only field necessary for the script to function).
Daria
10-17-2003, 01:53 PM
much simpler, indeed!
Follow up question: why not put the requirement on "your email", too?
when you leave sender's email field blank, it automatically inserts that website into the sender adress @ mail server.
Some people may not understand that email came from a friend, but rather think it is a spam message and not even read it, or, better yet - complain to the abuse@blablaba....
Simply enough done. I uploaded the new one in the post above.
Daria
10-17-2003, 02:24 PM
damn, you are fast!
:)
do you need the </td> in the refer.php for any reason, or is it just a forgotten chip?
Yep, that's called doing too many things at once... ;) Thanks for pointing it out, and again, that updated version is above.
december
12-20-2003, 05:53 PM
Hi pyro,
Love this code, it was just what I needed. I do have one question though. Is it possible for the part that says:
Page you are sending: http://..........
to have the title of the page with a link rather than showing the url? Thanks.
Yes, it would be possible.
Basically, what you will want to do is keep most of it the same, but read the referring URL (using file() (http://us3.php.net/manual/en/function.file.php) or file_get_contents() (http://us3.php.net/manual/en/function.file-get-contents.php)) into a string (thus the latter function would be more appropriate if your server supports it) and use a simple regex to match the title. Then, you can print that out rather than the URL.