-fs- ('. $value . ')
'; if ( $info['timed_out'] === false ) return $value; } } if ( $pwg_mode == 'fs' ) $pwg_mode = 'ch'; // Remind it // 3 - Sometime another solution: curl_exec // See http://fr2.php.net/manual/en/curl.installation.php if (function_exists('curl_init') and $pwg_mode == 'ch') { $ch = @curl_init(); @curl_setopt($ch, CURLOPT_URL, $url); @curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); @curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); @curl_setopt($ch, CURLOPT_HEADER, 1); @curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0'); @curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); $value = @curl_exec($ch); $header_length = @curl_getinfo($ch, CURLINFO_HEADER_SIZE); $status = @curl_getinfo($ch, CURLINFO_HTTP_CODE); @curl_close($value); if ($value !== false and $status >= 200 and $status < 400) { $value = substr($value, $header_length); // echo '
-ch- ('. $value . ')
'; return $value; } else $pwg_mode = 'failed'; // Sorry but remind it as well } // No other solutions $return["stat"] = 'failed'; // echo '
- pwg_get_contents: failed on file_get, fsockopen and cURL processes
'; return serialize($return); } ?>