views:

49

answers:

1

Let's say I want to use this API: http://hiveminder.com/help/reference/API.html

The instructions walk through its use via. the curl command line tool, which I'm unfamiliar with. I want to access this API through a simple script on my own page. What are the steps I need to do this?

Keep in mind it's been years since I've done any of this.

+1  A: 

Because cross-site requests can't be done from the client, they need to be initiated from the server. I'm personally not familiar with Hiveminder, but the way in which you achieve requests from one domain to another is generally:

  • On the client-side, grab any necessary information from the user and send it to your server
  • From the server-side, initiate a request to the next domain (in your case, Hiveminder)
  • When the result is returned from said domain, send that information back up to the client.

I don't know what language your using, but since you mentioned cURL you may be interested in checking out what PHP offers in its cURL manual.

Tom
I have a basic server (that I don't own) available with PHP, but I don't know offhand what tools are available on it. I'm not sure about cURL.
Daddy Warbox
If your host is running PHP on some variant of Linux, then you should be set.
Tom
What else besides cURL do I have as options?
Daddy Warbox
Depends on what kind of data you want to pull back - if the API provides responses in XML or JSON, those are options, too.
Tom
It appears to have those (and a few others). What do I need to do to begin using them, though?
Daddy Warbox
Basically, you just make a request to the HiveMinder API on the server-side and pass along any values necessary to tell it in what format you want their response. From there, you just parse it.
Tom