diff --git a/README.md b/README.md index aae7071..6aa07f5 100644 --- a/README.md +++ b/README.md @@ -18,15 +18,18 @@ ToDo: Historique des révisions: +- rev.15 remplacement de file_get_contents par cURL +- rev.14 remplacement des commandes pour virer tout ce qui avait avant "GET", + CURLOPT_POST =>false, + CURLOPT_USERAGENT => $user_agent, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HEADER => false, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_ENCODING => "", + CURLOPT_AUTOREFERER => true, + CURLOPT_CONNECTTIMEOUT => 120, + CURLOPT_TIMEOUT => 120, + CURLOPT_MAXREDIRS => 10, + ); + $ch = curl_init( $url ); + curl_setopt_array( $ch, $options ); + $content = curl_exec( $ch ); + $err = curl_errno( $ch ); + $errmsg = curl_error( $ch ); + $header = curl_getinfo( $ch ); + curl_close( $ch ); + $header['errno'] = $err; + $header['errmsg'] = $errmsg; + $header['content'] = $content; + return $header; +} + +function clean_rss($url) +{ + $source = better_file_get_content($url)[content]; + $corrige = stristr($source, ' +{ + echo '
@@ -62,7 +91,7 @@ else