json - php curl_init() function unable to open stream -


i trying show on web site guild member roster (just table) retrieving data url... http://eu.battle.net/api/wow/guild/pozzo%20dell%27eternit%c3%a0/i%20guardiani?fields=members here code:

function curl($url){ $ch = curl_init(); curl_setopt($ch, curlopt_url, $url); curl_setopt($ch, curlopt_returntransfer,1); curl_setopt($ch, curlopt_ssl_verifypeer, 0);  curl_setopt($ch, curlopt_sslversion, 3); $data = curl_exec($ch); curl_close($ch); return $data; }  $json = curl("http://eu.battle.net/api/wow/guild/pozzo%20dell%27eternit%c3%a0/i%20guardiani?fields=members"); if($json == false) { throw new exception("failed load infomation. check setup options"); } 

on laptop seems go without problems, when load page on web space curl() function seems not working, giving error:

fatal error: uncaught exception 'exception' message 'failed load infomation. check setup options' in /home/mhd-01/www.iguardiani.net/htdocs/wp-content/themes/parabola/warcraft_roster.php:103 stack trace:

#0 /home/mhd-01/www.iguardiani.net/htdocs/wp-includes/template-loader.php(47): include()

#1 /home/mhd-01/www.iguardiani.net/htdocs/wp-blog-header.php(16): require_once('/home/mhd-01/ww...')

#2 /home/mhd-01/www.iguardiani.net/htdocs/index.php(17): require('/home/mhd-01/ww...')

#3 {main} thrown in /home/mhd-01/www.iguardiani.net/htdocs/wp-content/themes/parabola/warcraft_roster.php on line 103

line 103 exception throw. curl() failing open stream.

i start saying curl functions active on web space. example of function curl using http://www.iguardiani.net/prova_c.php

$ch = curl_init('http://www.google.it'); echo curl_exec($ch); 

don't know how resolve problem stuck. suggestions?


Comments

Popular posts from this blog

design - Custom Styling Qt Quick Controls -

Unable to remove the www from url on https using .htaccess -