/    Sign up×
Community /Pin to ProfileBookmark

Finding the HTTP_REFERER from a httpS://

Hi,

I need to check that they have come from the paypal site

[url]https://www.paypal.com/uk/cgi-bin/webscr[/url]

i tried using this

[code=php]
if(substr($_SERVER[‘HTTP_REFERER’], 0, 40) !== “https://www.paypal.com/uk/cgi-bin/webscr”) {
echo “error”;
} else {
echo “success”;
}
[/code]

and wondered y it didn’t work. I figured out because i guess HTTP_REFERER is blocked when its a [url]https://[/url]

so how else can i check that they have come from the paypal site? i have no control over the paypal programing and it is only a href link from theres to mine once they have paid ( so no forms i could try and look at)

Any idea’s

Adam

to post a comment
PHP

8 Comments(s)

Copy linkTweet thisAlerts:
@k0r54authorOct 09.2004 — Please let me know if it can even be done so im not wasting any1 times

Cheers

Adam
Copy linkTweet thisAlerts:
@JonaOct 09.2004 — [font=trebuchet ms]The only thing I could think of would be search through all the environment variables for something that would be identifiable. Otherwise, there's no way that I know of.[/font]
Copy linkTweet thisAlerts:
@k0r54authorOct 09.2004 — Hi,

What would be the best way for that, there has to be something does https deffo block it?

thanks adam
Copy linkTweet thisAlerts:
@JonaOct 09.2004 — [font=trebuchet ms]Try phpinfo() and look at the server information that's outputted when PayPal is the referrer.[/font]
Copy linkTweet thisAlerts:
@k0r54authorOct 09.2004 — erm...

lol how exacly do i do that :p

Adz
Copy linkTweet thisAlerts:
@JonaOct 09.2004 — [font=trebuchet ms]The page that you are checking to see if PayPal referred on. Use the phpinfo function on that page and compare the results.[/font]
Copy linkTweet thisAlerts:
@k0r54authorOct 09.2004 — what exacly am i looking for :p

sorry
Copy linkTweet thisAlerts:
@JonaOct 09.2004 — [font=trebuchet ms]Changes in the environment. If you can't find anything in the global variables that's abnormal, there probably isn't any sure way to determine that someone came from PayPal.[/font]
×

Success!

Help @k0r54 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.15,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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