P0wmarklet

API Documentation

Our API allows you to retrieve informations from our website via GET request and supports the following query parameters:

Name Description
url (required) This parameter creates a short URL for your URL (site), and will return the following: id (unique id), url (site url), custom (will contain custom (alias) or/and subdomain if not empty) and the short (shortned url) value.
custom (optional) the name of custom alias.(For example : http://p0w.co/alias)
subdomain (optional) the name of subdomain.(For example : http://subdomain.p0w.co/)
frame (optional) The type of forward . Can be Cloack (frame = 1) or 302 redirect (frame = 0) .frame = 0 is default.
frame must be = 0 when both custom (alias) and subdomain are empty.


URL parameter

Here is an example of a GET request on our API:

http://p0w.co/api.php?url=http://google.com&custom=googlealias&subdomain=googlesub&frame=0

This is the output that our API will return when you query for an url:
{
   "apiVersion":"2.0",
   "data":{
	  "id":"mR2d",
	  "url":"http://google.com/",
	  "custom":"http://googlesub.p0w.co/googlealias",
	  "short":"http://p0w.co/mR2d",
	  "frame":"0"
   }
}
				
An example of json decoding would be the following PHP code:

<?php
header('Content-Type: text/plain; charset=utf-8;');
$file = file_get_contents("http://p0w.co/api.php?url=http://google.com");
print_r(json_decode($file));
?>