Code: Select all
if(isset($this->config['socialbuttons_facebook']) && ($this->config['socialbuttons_facebook'] == 1))
{
$querys['facebook'] = 'https://www.facebook.com/plugins/like.php?&layout=box_count&href=' . urlencode($url);
}
Code: Select all
foreach($querys as $platform => $query_url)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $query_url);
curl_setopt($ch, CURLOPT_NOBODY, false);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Firefox/31.0');
curl_multi_add_handle($mh, $ch);
$handle[$platform] = $ch;
}