1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Rep Power
    Hi all

    Ok, i have very little idea on how to make one of these...so please correct any of the code below if it is incorrect.

    I want to open site.com...read the html source...and extract say whats in the *s in this line..
    <b><font face="verdana">*Headline*</font></b>
    I also want it to retrieve wats in the *s more than once, ie..if that string can be found 10 times in the page...i want all 10 results.

    This will be running in the background, with a headline check every hour or so...not so that it scans when someone visits my page.

    I would then like for the *headline*s to be added to mysql (which i can handle myself).

    Here is my code..(well, php.net's)
    $file = fopen("http://www.php.net/", "r");
    if (!$file) {
    echo "<p>Unable to open remote file.n";
    while (!feof($file)) {
    $line = fgets($file, 1024);
    if (eregi("REGEXP", $line, $out)) {
    $headline = $out[1];

    Could someone help me with the regexp, and also help me with getting more than one result?

    Thanks in advance
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Rep Power
    i would think that a perl script running in a cron job would be easier than making it run in the background. plus, string parsing is easier in perl.

    then you could just have it dump the text to a file and pull it from there

Similar Threads

  1. making a schedule for workers
    By Dragons Master in forum PHP Development
    Replies: 1
    Last Post: December 31st, 2003, 04:48 AM
  2. Replies: 2
    Last Post: November 18th, 2003, 06:43 AM
  3. HELP! Headline Grabber...
    By -WBO- in forum Perl Programming
    Replies: 2
    Last Post: September 15th, 2003, 02:05 PM
  4. Developing a User Personalization System with PHP and Cookies
    By guest in forum Development Articles
    Replies: 109
    Last Post: May 28th, 2003, 09:04 AM
  5. making a library? DLL or .o file
    By ahuimanu in forum C Programming
    Replies: 3
    Last Post: February 13th, 2003, 03:00 PM

IMN logo majestic logo threadwatch logo seochat tools logo