Jump to content

[SOLVED] make a http request behind the scenes - query an API


fwd4

Recommended Posts

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.