API Documentation

Get Link Details

To use the API to get all the details about the link, send a GET request to http://bloggerster.com, with a url parameter.


Here is an example of a GET request to our API with the url parameter.

GET http://bloggerster.com/api?url=laravel.com

This is the output that our API will return when you query for an url:

  id: 113,
  url: "laravel.com",
  hash: "vo8Ao6",
  title: "Laravel - The PHP Framework For Web Artisans",
  description: "Laravel - The PHP framework for web artisans.",
  image: "http://laravel.com//assets/img/laravel-logo.png",
  visits: 1,
  created_at: "2016-01-14 09:06:24",
  updated_at: "2016-01-14 09:22:56"

Using the API in PHP

To use the API in your PHP application, you have to send a GET request through file_get_contents() or cURL: Both are reliable methods. You can see a sample code below using file_get_contents().

// Using JSON Response

$apiUrl       = http://bloggerster.com/api?url=google.com";
$response     = @json_decode(file_get_contents($api_url), true);

if ($response) {
    echo $response;