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
    Sep 2012
    Location
    Philippines
    Posts
    11
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Question Reading Specific Lines of a Webpage

    Is there a way to read a specific line from a webpage using PHP?
    I found a code readfile('http://domain.com'); but it reads the whole webpage.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    You may use file_get_contents() to read the contents to a variable and then iterate through to to reach the specific line.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    KazeFlame (10-26-2012)


  •  

    Posting Permissions

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