• Announcements

    • MannDude

      Current state of vpsBoard   02/04/2017

      Dear vpsBoard members and guests:

      Over the last year or two vpsBoard activity and traffic has dwindled. I have had a change of career and interests, and as such am no longer an active member of the web hosting industry.

      Due to time constraints and new interests I no longer wish to continue to maintain vpsBoard. The web site will remain only as an archive to preserve and showcase some of the great material, guides, and industry news that has been generated by members, some of which I remain in contact to this very day and now regard as personal friends.

      I want to thank all of our members who helped make vpsBoard the fastest growing industry forum. In it's prime it was an active and ripe source of activity, news, guides and just general off-topic banter and fun.

      I wish all members and guests the very best, whether it be with your business or your personal projects.


Search the Community

Showing results for tags 'share'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • vpsBoard
    • Announcements & Contests
    • Industry News
  • Virtual Private Servers
    • General Talk
    • Operating a VPS Business
    • Tutorials and Guides
    • Questions and Answers
  • The Lounge
    • The Pub (Off topic discussion)
    • Coding, Scripting & Programming
    • SBC, ARM, Home Automation
  • Marketplace & Reviews
    • Reviews
    • VPS Offers
    • Other Offers
    • Service Requests

Found 1 result

  1. ODD Sharer Behavior

    Hello, I am new here and I am hoping to get some answers and continue to use this forum for all my VPS issues; I have notices an odd behavior through my site over time and I think it's about time I took care of it; I have a VPS through WHM cPanel. Medium size package with 2 CPU Cores and 4GB RAM. About 300 Posts (WordPress Platform); I am using an Ok theme that is optimized actually and my score through gtmetrix is about 98% - 92% for yslow. Here is my issue: When I log in to my personal twitter and retweet my website tweets (Let's say about 10 of them) my VPS overloads immediately to 80% or more while it is under 1% any other times. Checking the logs through cPanel I noticed 1 (one) PHP file with "a lot" of queries and that is a sharrre.php - The only thing I can think of is maybe it is not optimized? The theme builder guy is a "no go" for this specific issue. I am attaching the code of that specific file so maybe you guys can help. I would REALLY appreciate it. Sarah. <?php header('content-type: application/json'); //Sharrre by Julien Hany $json = array('url'=>'','count'=>0); $json['url'] = $_GET['url']; $url = isset(urlencode($_GET['url'])) ? $_GET['url'] ? ''; $type = isset(urlencode($_GET['type'])) ? $_GET['type'] ? ''; $ori_url = isset($_GET['url']) ? $_GET['url'] ? ''; if(filter_var($ori_url, FILTER_VALIDATE_URL)){ if($type == 'googlePlus'){ //source http://www.helmutgranda.com/2011/11/01/get-a-url-google-count-via-php/ $contents = parse('https://plusone.google.com/u/0/_/+1/fastbutton?url=' . $url . '&count=true'); preg_match( '/window\.__SSR = {c: ([\d]+)/', $contents, $matches ); if(isset($matches[0])){ $json['count'] = (int)str_replace('window.__SSR = {c: ', '', $matches[0]); } } else if($type == 'stumbleupon'){ $content = parse("http://www.stumbleupon.com/services/1.01/badge.getinfo?url=$url"); $result = json_decode($content); if (isset($result->result->views)) { $json['count'] = $result->result->views; } } } echo str_replace('\\/','/',json_encode($json)); function parse($encUrl){ $options = array( CURLOPT_RETURNTRANSFER => true, // return web page CURLOPT_HEADER => false, // don't return headers CURLOPT_FOLLOWLOCATION => true, // follow redirects CURLOPT_ENCODING => "", // handle all encodings CURLOPT_USERAGENT => 'sharrre', // who am i CURLOPT_AUTOREFERER => true, // set referer on redirect CURLOPT_CONNECTTIMEOUT => 5, // timeout on connect CURLOPT_TIMEOUT => 10, // timeout on response CURLOPT_MAXREDIRS => 3, // stop after 10 redirects CURLOPT_SSL_VERIFYHOST => 0, CURLOPT_SSL_VERIFYPEER => false, ); $ch = curl_init(); $options[CURLOPT_URL] = $encUrl; curl_setopt_array($ch, $options); $content = curl_exec($ch); $err = curl_errno($ch); $errmsg = curl_error($ch); curl_close($ch); if ($errmsg != '' || $err != '') { /*print_r($errmsg); print_r($errmsg);*/ } return $content; }