Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Dec 2006
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    file_get_contents

    Hello,

    Im trying to read a html page and get php to alert me with a image symbol if i find the text "red" or "warning" or "green" on the html page.

    How can i search when using file_get_contents http ?

    Code:
    $content = file_get_contents('http://intranet:85/bb/bb.html'); 
    if ($content !== false) 
    {
    $find = look for red
    if $find = red view image red.gif
    $find = look for warning
    if $find = warning view image warning.gif
    $find = look for green
    if $find = green view image green.gif
    
    } 
    else 
    {      
    
    
    }

    ????????????????????

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Look into strpos().


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •