Daily horoscope script

Discussion in 'PHP' started by areaba, Jul 31, 2009.

  1. #1
    Hi,

    Can anyone tell me the free php horoscope scirpt. I want to put daily horoscope on my site, I dont want to udpate it myself. Can anyone know about some kind of horoscope script which were daily updated from other sites. But i want to show it in my own site.

    Thanks
     
    areaba, Jul 31, 2009 IP
  2. webDOMinator

    webDOMinator Peon

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Use CURL tools to grab the entire html page of another horoscope site, or a couple... then use a preg_match function to grab the horoscope text out from between it's html tags. Then, what I would do is just save that to a database so my program can pick later and doesn't have to do the calls in the moment (reducing time needed for loading the page).

    I would also use multiple sites if I were you. Make a preg_match regular expression that's different for each site on your collector bot. It's best if you use sites that give you random ones on the same page. That way you just have to call that page multiple times.

    I would also make it so that my database table for the horoscopes has a unique index on the horoscope itself to avoid duplicates.

    What you're basically asking for is a scraping robot/spider/gatherer script, and then a secondary script to do the random horoscope from the stuff your gatherer scrapes off the other sites.
     
    webDOMinator, Jul 31, 2009 IP
  3. areaba

    areaba Peon

    Messages:
    62
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for your help
     
    areaba, Aug 2, 2009 IP
  4. webDOMinator

    webDOMinator Peon

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No problem bro.
     
    webDOMinator, Aug 2, 2009 IP