Jump to content

kailash001

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Everything posted by kailash001

  1. Thanx for the help. But now i'm getting another problem. i'm able to extract the 1st article properly but when it extracts the 2nd one it extract it twice then the 3rd one once and then i get this error: Fatal error: Maximum execution time of 60 seconds exceeded in C:\wamp\www\mashup\protected\views\articles\simple_html_dom.php on line 70 can you tell me how can i make the script run faster? or any other solution?
  2. Hello guys, i'm trying to screen scrape the original content from every RSS feed. The RSS feeds works fine however when i try to screen scrape every content using the library simple html dom. At first it works fine but when it tries to extract the second feed's original content then i get this error: Fatal error: Cannot redeclare file_get_html() (previously declared in C:\wamp\www\mashup\protected\views\articles\simple_html_dom.php:37) in C:\wamp\www\mashup\protected\views\articles\simple_html_dom.php on line 41 part of my code is as follows: foreach($RSS_DOC->channel->item as $RSSitem) { $item_id = md5($RSSitem->title); $item_title = $RSSitem->title; $item_date = date("Y-m-j G:i:s", strtotime($RSSitem->pubDate)); $item_url = $RSSitem->link; echo "Processing item '" , $item_id , "<br/>"; echo $item_title, " - "; echo $item_date, "<br/>"; echo $item_url, "<br/>"; //screen scrape original article include('simple_html_dom.php'); $html = file_get_dom($item_url); foreach($html->find('td[class=rel_headline_cmt]') as $element) { echo $element; } } Any help with this?
  3. ok so i made some modifications <?php $words="Hello how are you"; $word_array = explode(" ", $words); $paragraph="Hello! I am fine. How about you? You look good."; $sencetences = strtok($paragraph, ".!?"); ?> now i have all the words in an array and the sentences are separated. i don't want to compare the words from DB but check its occurrence in the paragraph then assign the score to it. the score is in fact the number of times it is repeated in the paragraph.
  4. Hello guys, i need some help in assigning a score to a word according to its occurrence in a group of sentences. [code=php:0] $words="Hello, how are you?"; $sentences="Hello! I am fine. How about you? You look good."; [/code] now i'm trying to assign a score to each word in $words e.g Hello=1, how=1, are=0, you=2.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.