|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-11-11 18:16 UTC] aharvey@php.net
-Status: Open
+Status: Bogus
[2011-11-11 18:16 UTC] aharvey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 21:00:01 2025 UTC |
Description: ------------ <? // CONFIG START HERE // $article_folder='articles'; //Articles folder is the location of your list of articles in txt format (Optional) $random_list=1; //Random list of articles on the menu 1 for true and 0 for false $number_articles_menu=322; //Number of articles on the menu $main_keyword=""; //Type your main keyword here // CONFIG END HERE // define ('FULL_PATH', dirname (__FILE__) . '/'); define ('ARTICLES_DIR', FULL_PATH . $article_folder."/"); $addedtext=""; //stay empty function clean_url($text) { $text=strtolower($text); $code_entities_match = array(' ','--','"','!','@','#','$','%','^','&','*','(',')','_','+','{','}','|',':','"','<','>','?','[',']','\\',';',"'",',','.','/','*','+','~','`','='); $code_entities_replace = array('-','-','','','','','','','','','','','','','','','','','','','','','','','',''); $text = str_replace($code_entities_match, $code_entities_replace, $text); return $text; } function curl_string ($url,$user_agent='Mozilla 4.0'){ $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt ($ch, CURLOPT_TIMEOUT, 120); $result = curl_exec ($ch); curl_close($ch); return $result; } function amazonlabel($label){ return preg_replace('#Customer Rating#', 'Amazon Customer Rating', $label, 4 ); } function startElement($parser, $name, $attrs) { global $rss_channel, $current_data, $main; switch($name) { case "RSS": case "RDF:RDF": case "ITEMS": $current_data = ""; break; case "CHANNEL": $main = "CHANNEL"; break; case "IMAGE": $main = "IMAGE"; $rss_channel["IMAGE"] = array(); break; case "ITEM": $main = "ITEMS"; break; default: $current_data = $name; break; } } function endElement($parser, $name) { global $rss_channel, $current_data, $item_counter; $current_data = ""; if ($name == "ITEM") { $item_counter++; } } function characterData($parser, $data) { global $rss_channel, $current_data, $main, $item_counter; if ($current_data != "") { switch($main) { case "ITEMS": if (isset($rss_channel[$main][$item_counter][$current_data])) { $rss_channel[$main][$item_counter][$current_data] .= $data; } else { //print ("rss_channel[$main][$item_counter][$current_data] = $data<br />"); $rss_channel[$main][$item_counter][$current_data] = $data; } break; } } } function removetag($tag){ $tagged='tagged'; preg_match("#(.*?)".$tagged."#s", $tag, $value); return $value[1]; } ?> Test script: --------------- http://www.pramjcom.net/car/index.php Rss do not work http://www.pramjcom.net/car/rss.php and all pages Expected result: ---------------- Links feed does not work Actual result: -------------- Please I want to run Rss links