/    Sign up×
Community /Pin to ProfileBookmark

Paging pyro: re: refer.php

I tried one of your php codes for link referral posted in [URL=http://forums.webdeveloper.com/showthread.php?s=&postid=102238#post102238]this old thread[/URL] , 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.

to post a comment
PHP

7 Comments(s)

Copy linkTweet thisAlerts:
@pyroOct 17.2003 — Wow... that is some old, old code... Rather embarrassing, really ?

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).

[upl-file uuid=e34cca88-63fe-4264-9807-f164a148b1b6 size=2kB]sendlink.zip[/upl-file]
Copy linkTweet thisAlerts:
@DariaauthorOct 17.2003 — 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....
Copy linkTweet thisAlerts:
@pyroOct 17.2003 — Simply enough done. I uploaded the new one in the post above.
Copy linkTweet thisAlerts:
@DariaauthorOct 17.2003 — damn, you are fast!

?

do you need the </td> in the refer.php for any reason, or is it just a forgotten chip?
Copy linkTweet thisAlerts:
@pyroOct 17.2003 — Yep, that's called doing too many things at once... ? Thanks for pointing it out, and again, that updated version is above.
Copy linkTweet thisAlerts:
@decemberDec 20.2003 — 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.
Copy linkTweet thisAlerts:
@pyroDec 21.2003 — 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 [URL=http://us3.php.net/manual/en/function.file.php]file()[/URL] or [URL=http://us3.php.net/manual/en/function.file-get-contents.php]file_get_contents()[/URL]) 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.
×

Success!

Help @Daria spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...