Using linkbucks API / posting data using cURL in PHP



  • Register to linkbucks if you don’t have any account there (it’s free and you probably should use email other than gmail and hotmail if you want quick confirmation from linkbucks)
  • Find your username and API password from your profile page: . If your API password is empty, just click “Reset API Password” link to show it.

This is our little PHP function that help us to POST data to certain URL:

How to use it to call linkbucks API:

The curl_post function is quite generic, you can use it to send data to remote URL using POST method like this:

You should notice that the data array need to be converted using http_build_query first (in linkbucks’ case, it doesn’t need to be converted first).
You can also add more advanced feature in the function such as handling the timeout and cookie.

  1. thank you

  2. Great, as usual waiting your review about it 🙂

  3. Thanks, works perfectly!!!

  4. If I want to call this script in bash linux. What should I do?

Leave a Reply

%d bloggers like this: