Wednesday, February 19, 2014

how to register sub reseller httpapi curl php


Signing Up a Sub-Reseller Account using the httpapi.com api. It requires POST HTTP Method. You can use following function to register sub reseller with api intergration. You need auth-userid and api-key or auth-password for that. Look at code for more.

<?php
/*
Online PHP Examples with Source Code
website: http://4evertutorials.blogspot.in/
*/


function SIGNUP_RESELLER($data)
{
 // post all required data through via $_POST in $data
 $_data = $data;

 # API Url: for test=>https://test.httpapi.com , for live=>https://httpapi.com
 $api_url = 'https://test.httpapi.com'; 

 $auth_userid = ''; // reseller unique id
 $api_key = ''; // api-key or reseller password

 if(isset($auth_userid) && isset($api_key))
 {
  $handle = curl_init();
  curl_setopt($handle, CURLOPT_URL,$api_url.'/api/resellers/signup.xml');
  curl_setopt($handle, CURLOPT_POST, 1);
  curl_setopt($handle, CURLOPT_POSTFIELDS,
              'auth-userid='.$auth_userid.'&api-key='.$api_key.'&username='.urlencode($_data['username']).'&passwd='.urlencode($_data['passwd']).'&name='.urlencode($_data['name']).'&company='.urlencode($_data['company']).'&address-line-1='.urlencode($_data['address1']).'&city='.urlencode($_data['city']).'&state='.urlencode($_data['state']).'&country='.urlencode($_data['country']).'&zipcode='.urlencode($_data['zip']).'&phone-cc='.urlencode($_data['telnocc']).'&phone='.urlencode($_data['telno']).'&lang-pref='.$_data['langpref'].'&accounting-currency-symbol='.$_data['accountingcurrencysymbol'].'&selling-currency-symbol='.$_data['sellingcurrencysymbol']   );

  // receive server response ...
  curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
  $server_output = curl_exec ($handle);
  curl_close ($handle);


  // echo $server_output;
  if( strpos($server_output,'AlreadyReseller') === FALSE)
  {
   echo "You're Almost Done. Your Sub-Reseller Account has been successfully registered.";
   return true;
  }
  else
  {
   echo "".$_data['username']." Already Reseller";
  }

 }

 return false;


}

?>
USAGE
<?php
/*
Online PHP Examples with Source Code
website: http://4evertutorials.blogspot.in/
*/

 
    if($_SERVER["REQUEST_METHOD"] == "POST")
    {

       SIGNUP_RESELLER($_POST);
                              
    }
    else
    {
        $_POST = NULL;
    }

?>

Wednesday, February 5, 2014

Domain or IP whois information in php


Each Top Level Domain (TLD) has totally different whois server (example: .com and .net whois server is whois.verisign-grs.com) that listen at port no. 43. During this blog post we have list of whois servers according to their TLD. First extract TLD from domain and find its whois server. Then connect with whois server on port 43 using fsockopen() and write the domain name using fputs(). And at last read the response using fgets().

This class contains Automatically remove http:// and www. from start of domain, No dependencies, In-built IP and domain validator, Automatically lookup for secondary whois server features.

Following  is PHP class to get Domain or IP whois information. Save it as whois-lookup.php

<?php
/*
Online PHP Examples with Source Code
website: http://4evertutorials.blogspot.in/
*/

class getWhois{


private $WHOIS_SERVERS = array(
"com"               =>  array("whois.verisign-grs.com","whois.crsnic.net"),
"net"               =>  array("whois.verisign-grs.com","whois.crsnic.net"),
"org"               =>  array("whois.pir.org","whois.publicinterestregistry.net"),
"info"              =>  array("whois.afilias.info","whois.afilias.net"),
"biz"               =>  array("whois.neulevel.biz"),
"us"                =>  array("whois.nic.us"),
"uk"                =>  array("whois.nic.uk"),
"ca"                =>  array("whois.cira.ca"),
"tel"               =>  array("whois.nic.tel"),
"ie"                =>  array("whois.iedr.ie","whois.domainregistry.ie"),
"it"                =>  array("whois.nic.it"),
"li"                =>  array("whois.nic.li"),
"no"                =>  array("whois.norid.no"),
"cc"                =>  array("whois.nic.cc"),
"eu"                =>  array("whois.eu"),
"nu"                =>  array("whois.nic.nu"),
"au"                =>  array("whois.aunic.net","whois.ausregistry.net.au"),
"de"                =>  array("whois.denic.de"),
"ws"                =>  array("whois.worldsite.ws","whois.nic.ws","www.nic.ws"),
"sc"                =>  array("whois2.afilias-grs.net"),
"mobi"              =>  array("whois.dotmobiregistry.net"),
"pro"               =>  array("whois.registrypro.pro","whois.registry.pro"),
"edu"               =>  array("whois.educause.net","whois.crsnic.net"),
"tv"                =>  array("whois.nic.tv","tvwhois.verisign-grs.com"),
"travel"            =>  array("whois.nic.travel"),
"name"              =>  array("whois.nic.name"),
"in"                =>  array("whois.inregistry.net","whois.registry.in"),
"me"                =>  array("whois.nic.me","whois.meregistry.net"),
"at"                =>  array("whois.nic.at"),
"be"                =>  array("whois.dns.be"),
"cn"                =>  array("whois.cnnic.cn","whois.cnnic.net.cn"),
"asia"              =>  array("whois.nic.asia"),
"ru"                =>  array("whois.ripn.ru","whois.ripn.net"),
"ro"                =>  array("whois.rotld.ro"),
"aero"              =>  array("whois.aero"),
"fr"                =>  array("whois.nic.fr"),
"se"                =>  array("whois.iis.se","whois.nic-se.se","whois.nic.se"),
"nl"                =>  array("whois.sidn.nl","whois.domain-registry.nl"),
"nz"                =>  array("whois.srs.net.nz","whois.domainz.net.nz"),
"mx"                =>  array("whois.nic.mx"),
"tw"                =>  array("whois.apnic.net","whois.twnic.net.tw"),
"ch"                =>  array("whois.nic.ch"),
"hk"                =>  array("whois.hknic.net.hk"),
"ac"                =>  array("whois.nic.ac"),
"ae"                =>  array("whois.nic.ae"),
"af"                =>  array("whois.nic.af"),
"ag"                =>  array("whois.nic.ag"),
"al"                =>  array("whois.ripe.net"),
"am"                =>  array("whois.amnic.net"),
"as"                =>  array("whois.nic.as"),
"az"                =>  array("whois.ripe.net"),
"ba"                =>  array("whois.ripe.net"),
"bg"                =>  array("whois.register.bg"),
"bi"                =>  array("whois.nic.bi"),
"bj"                =>  array("www.nic.bj"),
"br"                =>  array("whois.nic.br"),
"bt"                =>  array("whois.netnames.net"),
"by"                =>  array("whois.ripe.net"),
"bz"                =>  array("whois.belizenic.bz"),
"cd"                =>  array("whois.nic.cd"),
"ck"                =>  array("whois.nic.ck"),
"cl"                =>  array("nic.cl"),
"coop"              =>  array("whois.nic.coop"),
"cx"                =>  array("whois.nic.cx"),
"cy"                =>  array("whois.ripe.net"),
"cz"                =>  array("whois.nic.cz"),
"dk"                =>  array("whois.dk-hostmaster.dk"),
"dm"                =>  array("whois.nic.cx"),
"dz"                =>  array("whois.ripe.net"),
"ee"                =>  array("whois.eenet.ee"),
"eg"                =>  array("whois.ripe.net"),
"es"                =>  array("whois.ripe.net"),
"fi"                =>  array("whois.ficora.fi"),
"fo"                =>  array("whois.ripe.net"),
"gb"                =>  array("whois.ripe.net"),
"ge"                =>  array("whois.ripe.net"),
"gl"                =>  array("whois.ripe.net"),
"gm"                =>  array("whois.ripe.net"),
"gov"               =>  array("whois.nic.gov"),
"gr"                =>  array("whois.ripe.net"),
"gs"                =>  array("whois.adamsnames.tc"),
"hm"                =>  array("whois.registry.hm"),
"hn"                =>  array("whois2.afilias-grs.net"),
"hr"                =>  array("whois.ripe.net"),
"hu"                =>  array("whois.ripe.net"),
"il"                =>  array("whois.isoc.org.il"),
"int"               =>  array("whois.isi.edu"),
"iq"                =>  array("vrx.net"),
"ir"                =>  array("whois.nic.ir"),
"is"                =>  array("whois.isnic.is"),
"je"                =>  array("whois.je"),
"jp"                =>  array("whois.jprs.jp"),
"kg"                =>  array("whois.domain.kg"),
"kr"                =>  array("whois.nic.or.kr"),
"la"                =>  array("whois2.afilias-grs.net"),
"lt"                =>  array("whois.domreg.lt"),
"lu"                =>  array("whois.restena.lu"),
"lv"                =>  array("whois.nic.lv"),
"ly"                =>  array("whois.lydomains.com"),
"ma"                =>  array("whois.iam.net.ma"),
"mc"                =>  array("whois.ripe.net"),
"md"                =>  array("whois.nic.md"),
"mil"               =>  array("whois.nic.mil"),
"mk"                =>  array("whois.ripe.net"),
"ms"                =>  array("whois.nic.ms"),
"mt"                =>  array("whois.ripe.net"),
"mu"                =>  array("whois.nic.mu"),
"my"                =>  array("whois.mynic.net.my"),
"nf"                =>  array("whois.nic.cx"),
"pl"                =>  array("whois.dns.pl"),
"pr"                =>  array("whois.nic.pr"),
"pt"                =>  array("whois.dns.pt"),
"sa"                =>  array("saudinic.net.sa"),
"sb"                =>  array("whois.nic.net.sb"),
"sg"                =>  array("whois.nic.net.sg"),
"sh"                =>  array("whois.nic.sh"),
"si"                =>  array("whois.arnes.si"),
"sk"                =>  array("whois.sk-nic.sk"),
"sm"                =>  array("whois.ripe.net"),
"st"                =>  array("whois.nic.st"),
"su"                =>  array("whois.ripn.net"),
"tc"                =>  array("whois.adamsnames.tc"),
"tf"                =>  array("whois.nic.tf"),
"th"                =>  array("whois.thnic.net"),
"tj"                =>  array("whois.nic.tj"),
"tk"                =>  array("whois.nic.tk"),
"tl"                =>  array("whois.domains.tl"),
"tm"                =>  array("whois.nic.tm"),
"tn"                =>  array("whois.ripe.net"),
"to"                =>  array("whois.tonic.to"),
"tp"                =>  array("whois.domains.tl"),
"tr"                =>  array("whois.nic.tr"),
"ua"                =>  array("whois.ripe.net"),
"uy"                =>  array("nic.uy"),
"uz"                =>  array("whois.cctld.uz"),
"va"                =>  array("whois.ripe.net"),
"vc"                =>  array("whois2.afilias-grs.net"),
"ve"                =>  array("whois.nic.ve"),
"vg"                =>  array("whois.adamsnames.tc"),
"yu"                =>  array("whois.ripe.net")
);

	public function whoislookup($domain)
	{
		$domain = trim($domain); //remove space from start and end of domain
		if(substr(strtolower($domain), 0, 7) == "http://") $domain = substr($domain, 7); // remove http:// if included
			if(substr(strtolower($domain), 0, 4) == "www.") $domain = substr($domain, 4);//remove www from domain
			if(preg_match("/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/",$domain))
			return $this->queryWhois("whois.lacnic.net",$domain);
			elseif(preg_match("/^([-a-z0-9]{2,100})\.([a-z\.]{2,8})$/i",$domain))
			{
				$domain_parts = explode(".", $domain);
				$tld = strtolower(array_pop($domain_parts));
				$server = $this->WHOIS_SERVERS[$tld][0];
					if(!$server) {
					return "Error: No appropriate Whois server found for $domain domain!";
					}
				$res=$this->queryWhois($server,$domain);
					while(preg_match_all("/Whois Server: (.*)/", $res, $matches))
					{
					$server=array_pop($matches[1]);
					$res=$this->queryWhois($server,$domain);
					}
				return $res;
			}
		else
		return "Invalid Input";
	}


	private function queryWhois($server,$domain)
	{
		$fp = @fsockopen($server, 43, $errno, $errstr, 20) or die("Socket Error " . $errno . " - " . $errstr);
		if($server=="whois.verisign-grs.com")
		$domain="=".$domain;
		fputs($fp, $domain . "\r\n");
		$out = "";
			while(!feof($fp)){
			$out .= fgets($fp);
			}
		fclose($fp);
		return $out;
	}

}


?>


Usage of class


<?php
/*
Online PHP Examples with Source Code
website: http://4evertutorials.blogspot.in/
*/


require_once("whois-lookup.php")
$whois=new getWhois;
echo $whois->whoislookup("Your domain or IP");


?>

Tuesday, February 4, 2014

Get Google pagerank by php

We all are able to read pagerank of any page in google toolbar. However google does not give any API to access it's Pagerank information. Therefore during this blog we are going to explain you how to get google pagerank in php code. Pagerank is a ranking given to any page between 0 to 10 by google. It's based mostly upon total numbers of backlinks to page. The higher pagerank can get higher position in search listing of google.

Following  is PHP class to get Google Pagerank. Save it as google-pagerank.php


<?php
/*
Online PHP Examples with Source Code
website: http://4evertutorials.blogspot.in/
*/

class GooglePageRank {

  public function show_google_pagerank($url) {
  $query="http://toolbarqueries.google.com/tbr?client=navclient-auto&ch=".$this->CheckforHash($this->getHashURL($url)). "&features=Rank&q=info:".$url."&num=100&filter=0";
  $data=file_get_contents($query);
  $pos = strpos($data, "Rank_");
   if($pos === false){} else{
   $pagerank = substr($data, $pos + 9);
   return $pagerank;
   }
  }

  public function StringToNumber($Str, $Check, $Magic)
  {
  $Int32Unit = 4294967296; // 2^32
  $length = strlen($Str);
   for ($i = 0; $i < $length; $i++) {
   $Check *= $Magic;
    if ($Check >= $Int32Unit) {
    $Check = ($Check - $Int32Unit * (int) ($Check / $Int32Unit));
    $Check = ($Check < -2147483648) ? ($Check + $Int32Unit) : $Check;
    }
   $Check += ord($Str{$i});
   }
  return $Check;
  }

  public function getHashURL($String)
  {
  $Check1 = $this->StringToNumber($String, 0x1505, 0x21);
  $Check2 = $this->StringToNumber($String, 0, 0x1003F);
  $Check1 >>= 2;
  $Check1 = (($Check1 >> 4) & 0x3FFFFC0 ) | ($Check1 & 0x3F);
  $Check1 = (($Check1 >> 4) & 0x3FFC00 ) | ($Check1 & 0x3FF);
  $Check1 = (($Check1 >> 4) & 0x3C000 ) | ($Check1 & 0x3FFF);
  $T1 = (((($Check1 & 0x3C0) << 4) | ($Check1 & 0x3C)) <<2 ) | ($Check2 & 0xF0F );
  $T2 = (((($Check1 & 0xFFFFC000) << 4) | ($Check1 & 0x3C00)) << 0xA) | ($Check2 & 0xF0F0000 );
  return ($T1 | $T2);
  }

  public function CheckforHash($Hashnum)
  {
  $CheckByte = 0;
  $Flag = 0;
  $HashStr = sprintf('%u', $Hashnum) ;
  $length = strlen($HashStr);
   for ($i = $length - 1; $i >= 0; $i --) {
   $Re = $HashStr{$i};
    if (1 === ($Flag % 2)) {
    $Re += $Re;
    $Re = (int)($Re / 10) + ($Re % 10);
    }
   $CheckByte += $Re;
   $Flag ++;
   }
  $CheckByte %= 10;
   if (0 !== $CheckByte) {
   $CheckByte = 10 - $CheckByte;
    if (1 === ($Flag % 2) ) {
     if (1 === ($CheckByte % 2)) {
     $CheckByte += 9;
     }
    $CheckByte >>= 1;
    }
   }
  return '7'.$CheckByte.$HashStr;
  }

}

?>

Usage of class

<?php
/*
Online PHP Examples with Source Code
website: http://4evertutorials.blogspot.in/
*/

require_once("google-pagerank.php");
$site_url='http://http://4evertutorials.blogspot.in';
$pagerank = new GooglePageRank();
echo "The $site_url has Google PageRank is ". $pagerank->show_google_pagerank($site_url) ;

?>

Saturday, January 25, 2014

POST request to https server php

Use following PHP function to make a POST request to https server


<?php
/*
Online PHP Examples with Source Code
website: http://4evertutorials.blogspot.in/
*/

$sock = fsockopen("ssl://secure.yoursite.com", 443, $errno, $errstr, 30);
if (!$sock) die("$errstr ($errno)\n");

$data = "var1=" . urlencode("Value for var1") . "&var2=" . urlencode("Value for var2");

fwrite($sock, "POST /action.php HTTP/1.0\r\n");
fwrite($sock, "Host: secure.yoursite.com\r\n");
fwrite($sock, "Content-type: application/x-www-form-urlencoded\r\n");
fwrite($sock, "Content-length: " . strlen($data) . "\r\n");
fwrite($sock, "Accept: */*\r\n");
fwrite($sock, "\r\n");
fwrite($sock, $data);

$headers = "";
while ($str = trim(fgets($sock, 4096)))
$headers .= "$str\n";

echo "\n";

$body = "";
while (!feof($sock))
$body .= fgets($sock, 4096);

fclose($sock);

?>

how to protect against cross site scripting php


PHP includes the mysql_real_escape_string() operate, that makes a string safe by adding escaping so it may be employed by alternative MySQL-related functions without concern of SQL injections. By escaping, I mean adding a slash ahead of any special characters. as an example, one quote (') would be regenerate to (\'). This tells MySQL that the only quote does not mark the top of a string however rather is a component of the string.

To protect against cross-site scripting, input has to be change to get rid of any and every one tags, as well as all hypertext mark-up language tags and others like  <script>, <object>, and <embed>. PHP strip_tags() will take away HTML tags, and that we will use a string replace to get rid of the others.
As an extra precaution, you ought to take away all special characters, like / ' $ % and #,, from the string. 

Working Example:




<?php


function make_input_safe($variable) {
    $variable = php_strip_html_tags($variable);
$bad = array("=","<", ">", "/","\"","`","~","'","$","%","#");
$variable = str_replace($bad, "", $variable);
    $variable = mysql_real_escape_string(trim($variable));
    return $variable;
}


?>



<?php


/*
Online PHP Examples with Source Code
website: http://4evertutorials.blogspot.in/
*/

function php_strip_html_tags( $text )
{
    $text = preg_replace(
        array(
          // Remove invisible content
            '@<head[^>]*?>.*?</head>@siu',
            '@<style[^>]*?>.*?</style>@siu',
            '@<script[^>]*?.*?</script>@siu',
            '@<object[^>]*?.*?</object>@siu',
            '@<embed[^>]*?.*?</embed>@siu',
            '@<applet[^>]*?.*?</applet>@siu',
            '@<noframes[^>]*?.*?</noframes>@siu',
            '@<noscript[^>]*?.*?</noscript>@siu',
            '@<noembed[^>]*?.*?</noembed>@siu'
        ),
        array(
            '', '', '', '', '', '', '', '', ''), $text );
      
    return strip_tags( $text);
}


?>







Monday, December 30, 2013

Common security functions in PHP





<?php
/*
Online PHP Examples with Source Code
website: http://4evertutorials.blogspot.in/
*/

/**
 * IsEmpty
 * 
 * @param mixed $value
 * @return boolean
 */
function IsEmpty($value) {
    if(strlen(trim(preg_replace('/\xc2\xa0/',' ',$value))) == 0) {
        return true;
    }else {
        return false;
    }
}


?>




<?php
/*
Online PHP Examples with Source Code
website: http://4evertutorials.blogspot.in/
*/

/**
 * Sanitize
 * 
 * @param mixed $value
 * @return string
 */
function Sanitize($value) {
    if(get_magic_quotes_gpc()) $value = stripslashes($value);
    return htmlentities($value, ENT_QUOTES, 'utf-8');
}


?>





<?php
/*
Online PHP Examples with Source Code
website: http://4evertutorials.blogspot.in/
*/

/**
 * ParseId
 * 
 * @param integer $id
 * @param integer $segment
 * @return mixed
 */
function ParseId($id, $segment = 2) {
    $pattern = '/^([0-9]+)-';
    for($i = 2; $i < $segment; $i++) {
        $pattern .= '([0-9]+)-';
    }
    $pattern .= '([0-9]+)$/';
    if(!preg_match($pattern, $id, $match)) {
        return false;
    }else {
        return $match;
    }
}


?>
<?php
/*
Online PHP Examples with Source Code
website: http://4evertutorials.blogspot.in/
*/


/**
 * ValidEmail
 * 
 * @param string $email
 * @return boolean
 */
function ValidEmail($email) {
    if(preg_match("/^[0-9a-z]+(([\.\-_])[0-9a-z]+)*@[0-9a-z]+(([\.\-])[0-9a-z-]+)*\.[a-z]{2,4}$/i", $email)) {
        return true;
    }else {
        return false;
    }
}

?>
<?php
/*
Online PHP Examples with Source Code
website: http://4evertutorials.blogspot.in/
*/


/**
 * ValidURL
 * 
 * @param string $email
 * @return boolean
 */
function ValidURL($url) {
    if(preg_match('/^https?:\/\/[^\s]+/i', $url)) {
        return true;
    }else {
        return false;
    }
}

?>
<?php
/*
Online PHP Examples with Source Code
website: http://4evertutorials.blogspot.in/
*/


/**
 * ValidString
 * 
 * @param string $string
 * @return boolean
 */
function ValidString($string) {
    if(preg_match('/^[a-z0-9A-z ]*$/i', $string)) {
        return true;
    }else {
        return false;
    }
}


?>
<?php
/*
Online PHP Examples with Source Code
website: http://4evertutorials.blogspot.in/
*/

/**
 * ValidUserName
 * 
 * @param string $string
 * @return boolean
 */
function ValidUserName($string) {
    if(preg_match('/^[a-z0-9]*$/i', $string)) {
        return true;
    }else {
        return false;
    }
}

?>
<?php
/*
Online PHP Examples with Source Code
website: http://4evertutorials.blogspot.in/
*/

/**
 * ValidImg
 * 
 * @param string $file
 * @return boolean
 */
function ValidImg($file) {
    $extensions = array('jpg','gif','png');
    $len  = strLen($file)-3;
    $ext  = strtolower(substr($file, $len, 3));
    if(in_array($ext, $extensions)) {
        return true;
    }else {
        return false;
    }
}


?>

Social Media URLs and PHP and JQuery


In this post we are learn check popularity of URL across social network like Facebook, Twitter, Reddit, Google plus, StumbleUpon, LinkedIn and Pinterest. Popularity means URL  how many times shared ,liked ,commented and pinned by the users across the social networks.

Note:  Use CURL function to grab this purpose. 

Facebook:

https://graph.facebook.com/fql?q=SELECT+like_count%2C+total_count%2C+share_count%2C+click_count%2C+comment_count+FROM+link_stat+WHERE+url+%3D+%22http%3A%2F%2Fgoogle.co.in%2F%22


It returns:

{
   "data": [
      {
         "like_count": 58263,
         "total_count": 211166,
         "share_count": 125191,
         "click_count": 86,
         "comment_count": 27712
      }
   ]
}






Twitter:

https://cdn.api.twitter.com/1/urls/count.json?url=http%3A%2F%2Fgoogle.co.in


It returns:

{"count":762,"url":"http:\/\/google.co.in\/"}









Reddit:

http://www.reddit.com/api/info.json?url=http%3A%2F%2Fgoogle.co.in

It returns:

{"kind": "Listing", "data": {"modhash": "", "children": [{"kind": "t3", "data": {"domain": "google.co.in", "banned_by": null, "media_embed": {}, "subreddit": "technology", "selftext_html": null, "selftext": "", "likes": null, "secure_media": null, "link_flair_text": null, "id": "100fzk", "secure_media_embed": {}, "clicked": false, "stickied": false, "author": "marktripeasy", "media": null, "score": 1, "approved_by": null, "over_18": false, "hidden": false, "thumbnail": "", "subreddit_id": "t5_2qh16", "edited": false, "link_flair_css_class": null, "author_flair_css_class": null, "downs": 0, "saved": false, "is_self": false, "permalink": "/r/technology/comments/100fzk/httplocalhost42600loyaltyaccountpointsummary/", "name": "t3_100fzk", "created": 1347867646.0, "url": "http://google.co.in", "author_flair_text": null, "title": "http://localhost:42600/Loyalty/Account/PointSummary", "created_utc": 1347864046.0, "ups": 1, "num_comments": 0, "visited": false, "num_reports": null, "distinguished": null}}, {"kind": "t3", "data": {"domain": "google.co.in", "banned_by": null, "media_embed": {}, "subreddit": "AdviceAnimals", "selftext_html": null, "selftext": "", "likes": null, "secure_media": null, "link_flair_text": null, "id": "s40co", "secure_media_embed": {}, "clicked": false, "stickied": false, "author": "ayushrj", "media": null, "score": 1, "approved_by": null, "over_18": false, "hidden": false, "thumbnail": "default", "subreddit_id": "t5_2s7tt", "edited": false, "link_flair_css_class": null, "author_flair_css_class": null, "downs": 0, "saved": false, "is_self": false, "permalink": "/r/AdviceAnimals/comments/s40co/google/", "name": "t3_s40co", "created": 1334131500.0, "url": "http://www.google.co.in", "author_flair_text": null, "title": "Google", "created_utc": 1334127900.0, "ups": 1, "num_comments": 1, "visited": false, "num_reports": null, "distinguished": null}}, {"kind": "t3", "data": {"domain": "google.co.in", "banned_by": null, "media_embed": {}, "subreddit": "funny", "selftext_html": null, "selftext": "", "likes": null, "secure_media": null, "link_flair_text": null, "id": "7zkbq", "secure_media_embed": {}, "clicked": false, "stickied": false, "author": "mbbala", "media": null, "score": 0, "approved_by": null, "over_18": false, "hidden": false, "thumbnail": "default", "subreddit_id": "t5_2qh33", "edited": false, "link_flair_css_class": null, "author_flair_css_class": null, "downs": 1, "saved": false, "is_self": false, "permalink": "/r/funny/comments/7zkbq/my_first_page/", "name": "t3_7zkbq", "created": 1235393963.0, "url": "http://www.google.co.in", "author_flair_text": null, "title": "My First Page", "created_utc": 1235393963.0, "ups": 1, "num_comments": 0, "visited": false, "num_reports": null, "distinguished": null}}, {"kind": "t3", "data": {"domain": "google.co.in", "banned_by": null, "media_embed": {}, "subreddit": "todayilearned", "selftext_html": null, "selftext": "", "likes": null, "secure_media": null, "link_flair_text": null, "id": "hv9ap", "secure_media_embed": {}, "clicked": false, "stickied": false, "author": "turner13", "media": null, "score": 0, "approved_by": null, "over_18": false, "hidden": false, "thumbnail": "default", "subreddit_id": "t5_2qqjc", "edited": false, "link_flair_css_class": null, "author_flair_css_class": null, "downs": 2, "saved": false, "is_self": false, "permalink": "/r/todayilearned/comments/hv9ap/til_the_guitar_was_invented_by_les_paul_by/", "name": "t3_hv9ap", "created": 1307598634.0, "url": "http://www.google.co.in", "author_flair_text": null, "title": "TIL the Guitar was invented by Les Paul by visiting the Google Home Page today. There is a Guitar on Google Home page which plays music too..", "created_utc": 1307595034.0, "ups": 2, "num_comments": 3, "visited": false, "num_reports": null, "distinguished": null}}, {"kind": "t3", "data": {"domain": "google.co.in", "banned_by": null, "media_embed": {}, "subreddit": "science", "selftext_html": null, "selftext": "", "likes": null, "secure_media": null, "link_flair_text": null, "id": "1170xo", "secure_media_embed": {}, "clicked": false, "stickied": false, "author": "moneykannan", "media": null, "score": 0, "approved_by": null, "over_18": false, "hidden": false, "thumbnail": "", "subreddit_id": "t5_mouw", "edited": false, "link_flair_css_class": null, "author_flair_css_class": null, "downs": 6, "saved": false, "is_self": false, "permalink": "/r/science/comments/1170xo/search/", "name": "t3_1170xo", "created": 1349793735.0, "url": "http://www.google.co.in", "author_flair_text": null, "title": "SEARCH", "created_utc": 1349790135.0, "ups": 3, "num_comments": 0, "visited": false, "num_reports": null, "distinguished": null}}, {"kind": "t3", "data": {"domain": "google.co.in", "banned_by": null, "media_embed": {}, "subreddit": "ExploreAmerica", "selftext_html": null, "selftext": "", "likes": null, "secure_media": null, "link_flair_text": null, "id": "13bj9u", "secure_media_embed": {}, "clicked": false, "stickied": false, "author": "moheetarora", "media": null, "score": 1, "approved_by": null, "over_18": false, "hidden": false, "thumbnail": "", "subreddit_id": "t5_2umqx", "edited": false, "link_flair_css_class": null, "author_flair_css_class": null, "downs": 0, "saved": false, "is_self": false, "permalink": "/r/ExploreAmerica/comments/13bj9u/googling/", "name": "t3_13bj9u", "created": 1353101986.0, "url": "http://www.google.co.in", "author_flair_text": null, "title": "googling", "created_utc": 1353101986.0, "ups": 1, "num_comments": 0, "visited": false, "num_reports": null, "distinguished": null}}, {"kind": "t3", "data": {"domain": "google.co.in", "banned_by": null, "media_embed": {}, "subreddit": "politics", "selftext_html": null, "selftext": "", "likes": null, "secure_media": null, "link_flair_text": null, "id": "zfvol", "secure_media_embed": {}, "clicked": false, "stickied": false, "author": "barackromney", "media": null, "score": 1, "approved_by": null, "over_18": false, "hidden": false, "thumbnail": "", "subreddit_id": "t5_2cneq", "edited": false, "link_flair_css_class": null, "author_flair_css_class": null, "downs": 0, "saved": false, "is_self": false, "permalink": "/r/politics/comments/zfvol/barackromney_yes_we_can_together_believe_in/", "name": "t3_zfvol", "created": 1346922086.0, "url": "http://google.co.in", "author_flair_text": null, "title": "BarackRomney: \"Yes We can Together Believe in America\"", "created_utc": 1346918486.0, "ups": 1, "num_comments": 1, "visited": false, "num_reports": null, "distinguished": null}}, {"kind": "t3", "data": {"domain": "google.co.in", "banned_by": null, "media_embed": {}, "subreddit": "sex", "selftext_html": null, "selftext": "", "likes": null, "secure_media": null, "link_flair_text": null, "id": "f01o3", "secure_media_embed": {}, "clicked": false, "stickied": false, "author": "lmyadav", "media": null, "score": 1, "approved_by": null, "over_18": false, "hidden": false, "thumbnail": "default", "subreddit_id": "t5_2qh3p", "edited": false, "link_flair_css_class": null, "author_flair_css_class": null, "downs": 0, "saved": false, "is_self": false, "permalink": "/r/sex/comments/f01o3/hhh/", "name": "t3_f01o3", "created": 1294724871.0, "url": "http://www.google.co.in", "author_flair_text": null, "title": "hhh", "created_utc": 1294724871.0, "ups": 1, "num_comments": 0, "visited": false, "num_reports": null, "distinguished": null}}, {"kind": "t3", "data": {"domain": "google.co.in", "banned_by": null, "media_embed": {}, "subreddit": "Twitter", "selftext_html": null, "selftext": "", "likes": null, "secure_media": null, "link_flair_text": null, "id": "bh817", "secure_media_embed": {}, "clicked": false, "stickied": false, "author": "hruaia", "media": null, "score": 1, "approved_by": null, "over_18": false, "hidden": false, "thumbnail": "default", "subreddit_id": "t5_2qhwg", "edited": false, "link_flair_css_class": null, "author_flair_css_class": null, "downs": 0, "saved": false, "is_self": false, "permalink": "/r/Twitter/comments/bh817/google/", "name": "t3_bh817", "created": 1269371573.0, "url": "http://www.google.co.in", "author_flair_text": null, "title": "Google", "created_utc": 1269367973.0, "ups": 1, "num_comments": 1, "visited": false, "num_reports": null, "distinguished": null}}, {"kind": "t3", "data": {"domain": "google.co.in", "banned_by": null, "media_embed": {}, "subreddit": "reddit.com", "selftext_html": null, "selftext": "", "likes": null, "secure_media": null, "link_flair_text": null, "id": "dx2to", "secure_media_embed": {}, "clicked": false, "stickied": false, "author": "hrkindian", "media": null, "score": 0, "approved_by": null, "over_18": false, "hidden": false, "thumbnail": "", "subreddit_id": "t5_6", "edited": false, "link_flair_css_class": null, "author_flair_css_class": null, "downs": 6, "saved": false, "is_self": false, "permalink": "/r/reddit.com/comments/dx2to/google/", "name": "t3_dx2to", "created": 1288174192.0, "url": "http://www.google.co.in", "author_flair_text": null, "title": "Google", "created_utc": 1288170592.0, "ups": 2, "num_comments": 3, "visited": false, "num_reports": null, "distinguished": null}}], "after": null, "before": null}}



StumbleUpon:

http://www.stumbleupon.com/services/1.01/badge.getinfo?url=http%3A%2F%2Fgoogle.co.in

It returns:

{"result":{"url":"http:\/\/www.google.co.in\/","in_index":true,"publicid":"1sbqjf","views":50621,"title":"Google","thumbnail":"http:\/\/cdn.stumble-upon.com\/mthumb\/849\/280849.jpg","thumbnail_b":"http:\/\/cdn.stumble-upon.com\/bthumb\/849\/280849.jpg","submit_link":"http:\/\/www.stumbleupon.com\/submit\/?url=http:\/\/www.google.co.in\/","badge_link":"http:\/\/www.stumbleupon.com\/badge\/?url=http:\/\/www.google.co.in\/","info_link":"http:\/\/www.stumbleupon.com\/url\/www.google.co.in\/"},"timestamp":1388407808,"success":true}





LinkedIn:


http://www.linkedin.com/countserv/count/share?url=http%3A%2F%2Fgoogle.co.in&format=json

It returns:

{"count":2586,"fCnt":"2,586","fCntPlusOne":"2,587","url":"http:\/\/google.co.in"}




Pinterest:


http://api.pinterest.com/v1/urls/count.json?callback=receiveCount&url=http%3A%2F%2Fgoogle.com

It returns:

receiveCount({"count": 10615, "url": "http://google.com"})


 

© 2014 4everTutorials. All rights resevered.

Back To Top