Cool Social Share Buttons with Share Count Script for PHP

The fastest share buttons with share count.

Last updated on
Subscribe to Internet Tips and Tools Feed

Social Network share buttons with share count can really slow down visitor's browsers that are using your website. Each button has to load the share count from the remote server of the social network. This sometimes causes pausing and freezing. Some of these buttons load asynchronously (async) with javascript and they may "claim" that they won't slow your website down. But this is not the case. Accessing the remote servers even asynchronously still causes the user to experience slowdowns.

With "Cool Social Share Buttons with Share Count Script for PHP" you can still display share buttons with share count for Google+, Facebook, Pinterest, Twitter and/or LinkedIn without slowing down your visitor's browsers because the share count is retrieved and cached on your server, so your visitor's browsers to not have to load any data from remote servers to display the share count.

Preview:

Social Buttons:
Share Count Style:
Buttons Direction:

Copy the data below to your website:






dlc_b


Download

Download
coolsocial.zip
Downloaded 0 times.
This script is provided for free but please consider making a donation to help with server costs and other expenses.

Unzip the 3 files in coolsocial.zip and upload them to your website after you edit the following variables in coolsocial.php:

	/* Edit the variables below */

	$share_url = $_SERVER['HTTP_REFERER']; // The url to share will be detected by the webpage address
	//$share_url = "http://www.seabreezecomputers.com"; // Or uncomment this line to specify URL to like
	$share_text = ""; // Used on Twitter and Pinterest as description. Blank out to use current document.title
	$share_image = ""; // Used on Pinterest. Blank out to use the webpage's meta og: or itemprop tags
	
	$get_count_onclick = true; // Get count whenever a user clicks a social button
	$get_count_minutes = 720; // 0 = Don't get count every n minutes; (720 = Get count every 12 hours)
	
	$use_twitter_newsharecounts = false; // If true then register your website at newsharecounts.com

	$db_username="your_mysql_username"; 
	$db_pw="your_mysql_password";
	$server="localhost"; // Usually keep as "localhost"
	$database="your_mysql_database";

coolsocial.zip includes these files:
coolsocial.phpThe PHP script for super fast share buttons with share count
coolsocial.cssThe css style sheets for the share buttons
db.phpRequired by coolsocial.php for mysql database functions

Last updated on January 8, 2017
Created on December 22, 2016

Back to www.seabreezecomputers.com
Subscribe to Internet Tips and Tools Feed        

User Comments

There are 0 comments.

Displaying first 50 comments.