php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #60270 Abed Adsense manuscript that do not appear Nutrition RSS in the search engines
Submitted: 2011-11-11 16:30 UTC Modified: 2011-11-11 18:16 UTC
From: saidmm dot mohamed at gmail dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.3.8 OS: linux
Private report: No CVE-ID: None
 [2011-11-11 16:30 UTC] saidmm dot mohamed at gmail dot com
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(' ','--','&quot;','!','@','#','$','%','^','&','*','(',')','_','+','{','}','|',':','"','<','>','?','[',']','\\',';',"'",',','.','/','*','+','~','`','=');
$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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-11 18:16 UTC] aharvey@php.net
-Status: Open +Status: Bogus
 [2011-11-11 18:16 UTC] aharvey@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 19:01:32 2024 UTC