[Plugin: StatSurfer] curl instead of url_fopen
-
Changed the statsurfer.php to use curl instead of url fopen. This is my diff:
# diff wp-content/plugins/statsurfer/statsurfer.php.orig wp-content/plugins/statsurfer/statsurfer.php 599c599,604 < $ciso = file_get_contents($url); --- > $curl_handle = curl_init($url); > curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT,10); > curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); > $ciso = ""; > $ciso = curl_exec($curl_handle); > curl_close($curl_handle); 2140c2145,2152 < $res = file_get_contents($url); --- > // $res = file_get_contents($url); > $curl_handle = curl_init($url); > curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT,10); > curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); > $res = ""; > $res = curl_exec($curl_handle); > curl_close($curl_handle); > 3285c3297,3303 < $ciso = file_get_contents($url); --- > // $ciso = file_get_contents($url); > $curl_handle = curl_init($url); > curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT,10); > curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); > $ciso = ""; > $ciso = curl_exec($curl_handle); > curl_close($curl_handle); 3550c3568,3574 < $ciso = file_get_contents($url); --- > // $ciso = file_get_contents($url); > $curl_handle = curl_init($url); > curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT,10); > curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); > $ciso = ""; > $ciso = curl_exec($curl_handle); > curl_close($curl_handle); 3713c3737,3743 < $ciso = file_get_contents($url); --- > // $ciso = file_get_contents($url); > $curl_handle = curl_init($url); > curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT,10); > curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); > $ciso = ""; > $ciso = curl_exec($curl_handle); > curl_close($curl_handle); 3944c3974 < ?> \ Kein Zeilenumbruch am Dateiende. --- > ?>
- The topic ‘[Plugin: StatSurfer] curl instead of url_fopen’ is closed to new replies.