Socialstats - A Simple Social Bar Without JavaScript
Last updated
The default looks
![]()

The theme is comparatively easy to configure, with one set of sprites for the images and one line of CSS to change between horizontal and vertical display mode.
The technical talk
The script fetches the JSON data from the corresponding services by parallel cURL execution, parsing out the number of times the provided URL has been shared. The traffic is fairly light, however caution should be exercised on high-traffic websites, as several requests are made each time the script is run.
To configure the script for your own sites usage, configure the $target variable in the first few lines, then proceed to comment out any services you do not wish to include.
Credits
The social media icons are taken from the excellent Designmodo free social bookmarking icon set, and the multiple cURL implementation was guided by Jon Haddad’s blogpost on the topic.
Download Socialstats
» Socialstats 1.1 (tar.gz)
Changelog
- Version 1.1
- Added concurrent Google Plus data
- Example page bundled in tarball
- Number formatting added
Known issues
For some reason, the Google Plus API does not take domain names without trailing slashes as a valid argument — it returns an error 400. URIs for underpages with or without extensions seems to work without problem.
Comments
The comments feature requires JavaScript execution.
Write a comment
Comment posting temporarily disabled.