"Site looks good but haven\'t pinged anything out yet, about to give it a go." - wkathomeMore



Pingler API documentation

General call format

All API calls are made using GET format, you would send your GET call to http://api.pingler.com.

Pingler API requires you to send different variables depending on the nature of the call, however any call requires “key” (the API key you receive from Pingler) and “act” (abbreviation for action).

Return from Pingler

Pingler API can return several different messages about any error that occurred. You have to check the message itself to see if the error occurred.

You can request API to return data in two different ways, either XML(default) or JSON. You can specify the format by adding extra GET variable called “op” and having the format name in lowercase.

Addition of URL through API

Required arguments

The following list of arguments is case sensitive.

  • key - The key you received from Pingler, can also be found in API Key tab in your account.
  • act - This has to be set to “add” for adding a URL to your account
  • url – The URL you wish to add to your Pingler account
  • title – This is optional, if it’s not provided – we will generate one from the URL provided
  • category_id – ID of a category you wish to submit this URL to, you can get the IDs of categories from another Pingler API call

Possible errors

  • 1001 - There was no API key specified
  • 1002 – The API key was not valid
  • 2001 – You did not specify a valid action for the API to handle
  • 2002 – A URL was not provided for the API to process
  • 2003 – You have exceeded allowed URL count in your account, you will need to either delete some URLs or upgrade
  • 3001 – Valid URL was not provided, please make sure that the URL is in correct format and starts with http://
  • 3002 – We could not generate a valid title to use from URL and you’ve not provided one
  • 3003 – General error that caused us to fail to process the URL and data you’ve provided
  • 3004 – General error that occurred when we tried to process extra data needed
  • 3005 – You already have this URL in your account
  • 3006 – General error when trying to assign the URL to your account

Example of simple call to Pingler API using PHP


<?php
# Your API KEY
$key "";
#URL you wish to add
$url "http://technorati.eu";
#Title of the URL(optional)
$title "Great site";

#We use XML format here to get the data
$call simplexml_load_file("http://api.pingler.com/?act=add&key=".$key."&title=".urlencode($title)."&url=".urlencode($url));

if(
$call->category->id == "SUCCESS!") {
    
#The URL was added
    
echo "It worked";
} else {
    
#Following error occured
    
echo $call->category->name;
}
?>

Requesting Pingler category list

Required arguments

The following list of arguments is case sensitive.

  • key - The key you received from Pingler, can also be found in API Key tab in your account.
  • act - This has to be set to “cats” for retrieving category list

Possible errors

  • 1001 - There was no API key specified
  • 1002 – The API key was not valid
  • 5001 – We could not find any categories in the Pingler system

Example of simple call to Pingler API using PHP


<?php
# Your API KEY
$key "";

#We use XML format here to get the data
$call simplexml_load_file("http://api.pingler.com/?act=cats&key=".$key);
if(
count($call->category) > 1) {
    
#The URL was added
    
foreach($call->category as $cat) {
        echo 
$cat->id." - ".$cat->name."<br/>";
    }
} else {
    
#Following error occured
    
echo $call->category->name;
}
?>