YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Access Denied Options
zoobie
#1 Posted : Thursday, July 17, 2003 4:26:32 AM
Rank: Starting Member

Groups: Registered

Joined: 1/16/2003
Posts: 65
Location: ,
I have the code below in my thankyou page but even after I purchase something and click continue from Paypal, I'm still denied access...Fix? Thanks <?php if (!preg_match("/^65.206/", $REMOTE_ADDR)) { echo "<html><body bgcolor='#ffffff'><div align='center' style='margin-top:50px;font:bold 30px tahoma;color:red'>ACCESS DENIED</div></body></html>"; } else { header("Location: http://site.com/download_page.html"); } ?>
Sponsor  
 
paypal_pb
#2 Posted : Thursday, July 17, 2003 3:22:14 PM
Rank: Starting Member

Groups: Registered

Joined: 9/16/2002
Posts: 2,960
Location: ,
Some web servers disallow a POST to an HTML page. You'll either need to switch your "return" url to a .php page or include rm=1 in your PayPal pay button which will cause the Continue button to link/GET the "return" URL.

Patrick Breitenbach
PayPal, Inc.
Dev Net: https://www.paypal.com/pdn
zoobie
#3 Posted : Thursday, July 17, 2003 4:28:32 PM
Rank: Starting Member

Groups: Registered

Joined: 1/16/2003
Posts: 65
Location: ,
Access still denied...

My return page is already a .php page and PP is posting to it.
I've tried rm=1 and rm=2 changing the POST/GET.
I have tried with the IPN turned on and off...Access still denied.

Should I be including something in my return page script like:
$REMOTE_ADDR = $_POST['REMOTE_ADDR']; ???
paypal_pb
#4 Posted : Thursday, July 17, 2003 9:10:50 PM
Rank: Starting Member

Groups: Registered

Joined: 9/16/2002
Posts: 2,960
Location: ,
What page are you trying to access?

Patrick Breitenbach
PayPal, Inc.
Dev Net: https://www.paypal.com/pdn
zoobie
#5 Posted : Friday, July 18, 2003 12:46:09 AM
Rank: Starting Member

Groups: Registered

Joined: 1/16/2003
Posts: 65
Location: ,
Huh?
Windwaker
#6 Posted : Friday, July 18, 2003 8:49:49 PM
Rank: Starting Member

Groups: Registered

Joined: 4/14/2003
Posts: 59
Location: ,

I think you want to use HTTP_REFERER instead. The remote addr is the client side.

Of course, you shouldn't soley rely on http_referer since it can be spoofed rather easily.
zoobie
#7 Posted : Saturday, July 19, 2003 12:27:54 AM
Rank: Starting Member

Groups: Registered

Joined: 1/16/2003
Posts: 65
Location: ,
You know...I tried for about a month last year to use $HTTP_REFERER even going as far as calling Paypal to ask...The tech knew absolutely nothing about it and after posting in several forums with a lot of talented people, we determined they had dynamically disabled it. I was thinking the above code was doing the same thing...since it's checking the Paypal address.
anoops
#8 Posted : Monday, July 21, 2003 7:34:33 PM
Rank: Starting Member

Groups: Registered

Joined: 7/21/2003
Posts: 11
Location: ,
Why would PayPal disable referers? I've been trying to get my referer script to work with PayPal and I just assumed somehow PayPal did not have one. I know referers can be spoofed and some people have them disabled, but I want to use referers, so that if someone links to my thank you page they get redirected.

And I know a PayPal representative is going to say use IPN. Almost every question is answered "Try IPN" or "Read this article" which oddly enough is about IPN. Well I'm not going to use IPN, and I know many people also are refusing this new break through in technology.

Anywho, PayPal disabled referers.. could/would they just as easily enable them?
paypal_pb
#9 Posted : Monday, July 21, 2003 8:41:55 PM
Rank: Starting Member

Groups: Registered

Joined: 9/16/2002
Posts: 2,960
Location: ,
I don't believe it's possible to disable referrers since that is fully controlled by the browser. The browser simply reports the URL from which the surfer traveled. There is no referrer in IPN, though, as there should not be.

Patrick Breitenbach
PayPal, Inc.
Dev Net: https://www.paypal.com/pdn
paypal_pb
#10 Posted : Monday, July 21, 2003 9:02:53 PM
Rank: Starting Member

Groups: Registered

Joined: 9/16/2002
Posts: 2,960
Location: ,
I'm not able to retrieve the referer. I'm checking into it.

Patrick Breitenbach
PayPal, Inc.
Dev Net: https://www.paypal.com/pdn
anoops
#11 Posted : Monday, July 21, 2003 11:38:23 PM
Rank: Starting Member

Groups: Registered

Joined: 7/21/2003
Posts: 11
Location: ,
Thanks, it'd help me out a lot, others too I would imagine.
zoobie
#12 Posted : Tuesday, July 22, 2003 1:14:01 AM
Rank: Starting Member

Groups: Registered

Joined: 1/16/2003
Posts: 65
Location: ,
One requirement is that the user must have clicked on a link...which the user does when he clicks "continue" in Paypal. Like I said, you won't be able to use HTTP_REFERER for one reason or another...possibly because it's a secured site.
anoops
#13 Posted : Tuesday, July 22, 2003 2:24:53 AM
Rank: Starting Member

Groups: Registered

Joined: 7/21/2003
Posts: 11
Location: ,
I just did some research and your guess was right, RFC 2616 section 15.1.3 says that clients should not include a referer when transmitting from a secure site to a nonsecure site. And I won't hold my breath waiting for the continue page to be put on a nonsecure server.
anoops
#14 Posted : Tuesday, July 22, 2003 3:08:00 AM
Rank: Starting Member

Groups: Registered

Joined: 7/21/2003
Posts: 11
Location: ,
I just noticed that PayPal stores its images on a nonsecured server, ex: http://images.paypal.com/images/x-click-but5.gif so maybe it's not too far fetched to have the continue page alone on a nonsecured server.
paypal_pb
#15 Posted : Tuesday, July 22, 2003 10:16:21 PM
Rank: Starting Member

Groups: Registered

Joined: 9/16/2002
Posts: 2,960
Location: ,
I think there's more to it than that. Our server would have to redirect from a secure posted page to an unsecure page whcih normally causes problems.

Also, since it's trivial to spoof the referer, we generally recommend against relying on it.

Patrick Breitenbach
PayPal, Inc.
Dev Net: https://www.paypal.com/pdn
anoops
#16 Posted : Wednesday, July 23, 2003 2:39:43 AM
Rank: Starting Member

Groups: Registered

Joined: 7/21/2003
Posts: 11
Location: ,
My real interest in referers is just keeping download pages from being linked to or indexed by search engines. That said, I think it would be a good move to disallow pages with referers. It wouldn't be completely effective, but it wouldn't cause any harm either.
zoobie
#17 Posted : Friday, July 25, 2003 8:29:17 PM
Rank: Starting Member

Groups: Registered

Joined: 1/16/2003
Posts: 65
Location: ,
Yeah...It's kinda lame when you havta tell Paypal just how their setup works...
You're probably better off using Authorize.net, worldpay, ECHO, paysystems, or Kagi anyway because they don't make the customer signup like paypal does instantly killing sales...
Windwaker
#18 Posted : Tuesday, July 29, 2003 11:41:07 PM
Rank: Starting Member

Groups: Registered

Joined: 4/14/2003
Posts: 59
Location: ,

Zoobie -

Give the guy a break. At least PayPal is willing to take the time to investigate these things free of charge.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFVision Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.308 seconds.