Jump to content

Header With Post Vars?


astralaaron

Recommended Posts

Is it possible to do the same thing as this:header('location:example.php?mode=1&id=1');but instead send variables in a POST array instead of GET?*EDIT - without using a <form>*EDIT2:I think paypal does this on their instant notification.. can someone help me understand how to use the fsocketopen?// post back to PayPal system to validate$header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";$header .= "Content-Type: application/x-www-form-urlencoded\r\n";$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";$fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);*EDIT3.. I am reading around about it I dont get which headers I need to use and why*EDIT4 - I just thought of a problem, is there a way to actually send the user along with this post data?

Link to comment
Share on other sites

*EDIT4 - I just thought of a problem, is there a way to actually send the user along with this post data?
Yeah, with a form submitted through Javascript. PHP works on the server, it really doesn't have anything to do with the user. Any post request from PHP will not affect the user.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...