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
    Regular Coder
    Join Date
    Jun 2002
    Location
    England
    Posts
    172
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help with script

    I need to make a script which fetches a webpage (all the html on it).

    If for example the page is like this:

    <html><body><font face=arial>blah blah blah </font><a href="whatever">whatever</a><p><font face=verdana size=1>etc etc</font></p>
    I only need the script to cut off everything before the '<p>' tag and echo the rest of the html after it.

    I have no idea how ?
    \o/

  • #2
    Regular Coder dswimboy's Avatar
    Join Date
    Nov 2003
    Location
    mostly in Ann Arbor
    Posts
    458
    Thanks
    0
    Thanked 0 Times in 0 Posts
    use file_get_contents() to read the file into a string. then use RegEx to extract the HTML you need.


  •  

    Posting Permissions

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