Jump to content


Photo

fsockopen and fgets challenges


  • Please log in to reply
1 reply to this topic

#1 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 21 June 2006 - 09:37 PM

I'm sending a POST request to paypal for payment verificication. The results are supposed to look like this:

SUCCESS
first_name=Jane+Doe
last_name=Smith
payment_status=Completed
payer_email=janedoesmith%40hotmail.com
payment_gross=3.99
mc_currency=USD
custom=For+the+purchase+of+the+rare+book+Green+Eggs+%26+Ham

If I manually post a form, it looks fine. However, because I'm using fsockopen and fgets, the results are quite askew:
10 
SUCCESS
mc_gross
6  
=3.99
1  


e  
address_status
1  
=
9  
confirmed
1 

...etc... 
Is there a way to remedy this under PHP 4.3?

#2 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 22 June 2006 - 12:09 AM

I have circumvented this issue by using PHP's curl functions.

However, I would really like to learn the cause of extraneous text and newline data in my fgets results.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users