fwd4 Posted July 3, 2007 Share Posted July 3, 2007 Quick question (I hope)... When someone is redirected to my site I am given a user ID and a token parameter on the URL like so: http://www.mysite.com/download.php?userID=12345&token=ABCDEF I'm picking the user ID and token parameters up from the URL using GET. Once I have them I need to check the validity with a 3rd party API in the format: http://xml.checker.com/tokencheck.asp?t=ABCDEF&u=12345 In return I get a simple XML output of either true or false: <?xml version="1.0"?> <response success="false"> </response> My question is how do I make the make the HTTP request to the tokencheck.asp and parse back the simple XML? I'm pretty new to all of this but enjoying it immensely! Thanks in advance FWD4 Quote Link to comment Share on other sites More sharing options...
per1os Posted July 3, 2007 Share Posted July 3, 2007 www.php.net/simplexml (may be for PHP 5 only) www.php.net/xml (should be for both) Quote Link to comment Share on other sites More sharing options...
fwd4 Posted July 3, 2007 Author Share Posted July 3, 2007 thanks frost110 - I have been looking at these already so I must be in the right place. How would I go about making the http request to the 3rd party tokencheker.asp? Quote Link to comment Share on other sites More sharing options...
per1os Posted July 3, 2007 Share Posted July 3, 2007 www.php.net/file_get_contents www.php.net/curl either should work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.