How we can download web page in php?

Discussion in 'PHP' started by leon25, Dec 15, 2010.

  1. #1
    I would like to download a web page in php programming
    If any one shares it will be good.
     
    leon25, Dec 15, 2010 IP
  2. riteshsanap

    riteshsanap Well-Known Member

    Messages:
    217
    Likes Received:
    2
    Best Answers:
    3
    Trophy Points:
    168
    #2
    Not sure you can do this , as PHP is processed on the server and then it is send to the browser
     
    riteshsanap, Dec 15, 2010 IP
  3. tvoodoo

    tvoodoo Active Member

    Messages:
    239
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    53
    #3
    $web_page = file_get_contents('http://www.google.com');
     
    tvoodoo, Dec 15, 2010 IP
  4. riteshsanap

    riteshsanap Well-Known Member

    Messages:
    217
    Likes Received:
    2
    Best Answers:
    3
    Trophy Points:
    168
    #4
    Will this surely Work kya dude
     
    riteshsanap, Dec 15, 2010 IP
  5. tvoodoo

    tvoodoo Active Member

    Messages:
    239
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    53
    #5
    What do you mean ? He wants the content of the page from what I've understood not the code that generates the page.
     
    tvoodoo, Dec 15, 2010 IP
  6. animebuzz.tv

    animebuzz.tv Peon

    Messages:
    317
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    yeah this one will do to download the generated html of the page, but if you want to download the server side code its not possible
     
    animebuzz.tv, Dec 15, 2010 IP
  7. riteshsanap

    riteshsanap Well-Known Member

    Messages:
    217
    Likes Received:
    2
    Best Answers:
    3
    Trophy Points:
    168
    #7
    I m also saying the same stuff :p , coz PHP is processed on the Server and then its servers to the Browser
     
    riteshsanap, Dec 15, 2010 IP