Monday, 10 June 2013

New social count data api services

A free social count json api to simplify your analysis for your web sites.


Social networking playing important roles in our life, we can use its to share, post and like to increase popularity and realism of a web site. But with growing of web social channels and variety of calling api methods(fql, twitter json and more) make us difficult to gather  share or like information from our web sites.

Here i come out with new json request API to track your website shares, likes, tweets, and more. Just type/paste a your website URL in the box and select social channel you want to track. You can to make your own graph or analysis by just doing http request by any programming language(jquery, java, c#..)  to any program or software. Thank to the powerful of nodejs for assist me create this great json api. You can login to pgurl.com to using the services.

The service is free. Here with sample of http request by using jquery:-
var getSocialCounterJson = function(yoururl){
var rurl = "http://pgurl.com/api/s/?url=" + encodeURIComponent(yoururl) + "&q=*";
$.get(url, function(json){
console.log(json);
//put your coding here
});
return false;
}
i use http://download.cnet.com as sample url and it return as bellows

{
    "targeturl": "http://download.cnet.com/",
    "totalshare": 53932,
    "totallike": 1309,
    "totalall": 55241,
    "socials": [
        {
            "name": "facebook",
            "pgurlcounttrackerurl": "http://pgurl.com/api/socialcount/?turl=http://download.cnet.com/&q=facebook&tq=share",
            "shareurl": "http://www.facebook.com/sharer/sharer.php?u=http://download.cnet.com/&t=",
            "sharecount": 4881,
            "likecount": 1309,
            "sharestring": "Shares",
            "likestring": "Likes",
            "updatedtim": "2013-06-11T06:03:08.250Z"
        },
        {
            "name": "twitter",
            "pgurlcounttrackerurl": "http://pgurl.com/api/socialcount/?turl=http://download.cnet.com/&q=twitter&tq=share",
            "shareurl": "https://twitter.com/intent/tweet?text=&url=http://download.cnet.com/",
            "sharecount": 47746,
            "likecount": 0,
            "sharestring": "Tweets",
            "likestring": "Tweets",
            "updatedtim": "2013-06-11T06:03:08.263Z"
        },
        {
            "name": "googleplus",
            "pgurlcounttrackerurl": "http://pgurl.com/api/socialcount/?turl=http://download.cnet.com/&q=googleplus&tq=share",
            "shareurl": "https://plus.google.com/share?url=http://download.cnet.com/",
            "sharecount": 1047,
            "likecount": 0,
            "sharestring": "+1s",
            "likestring": "+1s",
            "updatedtim": "2013-06-11T06:03:08.145Z"
        },
        {
            "name": "linkedin",
            "pgurlcounttrackerurl": "http://pgurl.com/api/socialcount/?turl=http://download.cnet.com/&q=linkedin&tq=share",
            "shareurl": "https://www.linkedin.com/cws/share?url=http://download.cnet.com/&token=&isFramed=true",
            "sharecount": 21,
            "likecount": 0,
            "sharestring": "Shares",
            "likestring": "Shares",
            "updatedtim": "2013-06-11T06:03:08.033Z"
        },
        {
            "name": "delicious",
            "pgurlcounttrackerurl": "http://pgurl.com/api/socialcount/?turl=http://download.cnet.com/&q=delicious&tq=share",
            "shareurl": "http://www.delicious.com/save?v=5&noui&jump=close&url=http://download.cnet.com/&title=",
            "sharecount": 221,
            "likecount": 0,
            "sharestring": "Bookmarks",
            "likestring": "Bookmarks",
            "updatedtim": "2013-06-11T06:03:08.120Z"
        },
        {
            "name": "stumbleupon",
            "pgurlcounttrackerurl": "http://pgurl.com/api/socialcount/?turl=http://download.cnet.com/&q=stumbleupon&tq=share",
            "shareurl": "http://www.stumbleupon.com/badge/?url=http://download.cnet.com/",
            "sharecount": 16,
            "likecount": 0,
            "sharestring": "Stumbles",
            "likestring": "Stumbles",
            "updatedtim": "2013-06-11T06:03:08.226Z"
        },
        {
            "name": "pinterest",
            "pgurlcounttrackerurl": "http://pgurl.com/api/socialcount/?turl=http://download.cnet.com/&q=pinterest&tq=share",
            "shareurl": "http://pinterest.com/pin/create/button/?url=http://download.cnet.com/&description=",
            "sharecount": 0,
            "likecount": 0,
            "sharestring": "Pinned",
            "likestring": "Pinned",
            "updatedtim": "2013-06-11T06:03:08.266Z"
        }
    ]

So, it simple right? You can use this json data to make your reports or design your apps. You can navigate to pgurl.com generate the api url and call by your system.








URL Shortening API

A free URL forwarding api service allowing anyone to take any existing URL and shorten it.  And it never expires


URL shortening services is common but playing important to our web developer life for advertising, publishing and sharing purposes. Short url also can make quick response code (QR)  easy to be scan or read by mobile devices. You need a url shortening services for your system or batch? He i come out with new url shoring api services to simplify your task without any authentications (like oauth). One more important thing, it's never expire.

You can go to pgurl.com to generate your own short url or calling http request by following sample.

I using jquery as coding sample.

var getShortUrl = function(yoururl){
var rurl = "http://pgurl.com/shorturl/create/?lurl=" + encodeURIComponent(yoururl) + "&q=*";
$.get(url, function(txt){
console.log(txt);
//put your coding here
});
return false;
}

i use http://easydeveloperlife.blogspot.com/ as sample and the api return as bellow:-

pgurl.com/6e4ea


Now you can call the url and redirect to my blogs. I using hash algorithm to make sure the url will not repeat or redundancy. You can requesting the api by any system or any programming languages to get your shorturl works. No need programing the function again. Simple, right?



Sunday, 9 June 2013

A free and simple page tracker API (No javascript required)

Visitor tracking is important to know popularity of our web site. Now we have a lot of great tools like google analytics are playing important tools to do analysis to our web site with statistic data.. But sometime we just need simple data like how many visitor and where they come from. Here i come out with another api call page tracker api.

Page Tracking Object from pgurl.com
Sample Page Tracking image from pgurl.com
Page tracker api is build by HTML5 Canvas and not javascript required. Just generate tracking code and <img> tag form pgurl.com and insert into any part of your html body. Page tracker will start tracking your visitor by number of time the image has been loaded. After that, you just requesting the page tracker api to generate visitor data in json format as below sample:-
http://pgurl.com/api/et/?id=2j9ukfmq3f9
 Its simple and lite. Right?