Savin webpages

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Netko

    Savin webpages

    Hi.

    I am new to php, and i would like to ask you how can i save some
    webpage(source code) in a file?

    I know how to do it with http sites, but i cant get it to work with https
    sites
    I was trying to use cURL, but for some reason i cant get whole webpage into
    fil, but only a part.

    So can someone write example how to catch webpage source and put it in to
    file?
  • Al Binns

    #2
    Re: Savin webpages

    Netko wrote:[color=blue]
    > Hi.
    >
    > I am new to php, and i would like to ask you how can i save some
    > webpage(source code) in a file?
    >
    > I know how to do it with http sites, but i cant get it to work with https
    > sites
    > I was trying to use cURL, but for some reason i cant get whole webpage into
    > fil, but only a part.
    >
    > So can someone write example how to catch webpage source and put it in to
    > file?[/color]

    Well if cURL isn't working for you then you could roll your own using
    fsockopen to create a http socket, send the appropriate headers then
    read the response like a normal file handle. Check fsockopen() for
    examples...

    Obviously this wouldn't be as good as using cURL

    Al

    Comment

    • Jerry Stuckle

      #3
      Re: Savin webpages

      Netko wrote:[color=blue]
      > Hi.
      >
      > I am new to php, and i would like to ask you how can i save some
      > webpage(source code) in a file?
      >
      > I know how to do it with http sites, but i cant get it to work with https
      > sites
      > I was trying to use cURL, but for some reason i cant get whole webpage into
      > fil, but only a part.
      >
      > So can someone write example how to catch webpage source and put it in to
      > file?[/color]

      You can't get php source via http or https - all you'll get is the
      resulting html code.

      To get the source you need use ftp.

      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      • Netko

        #4
        Re: Savin webpages

        Datuma Thu, 23 Feb 2006 14:41:12 -0500, Jerry Stuckle je napisao\la:[color=blue]
        > You can't get php source via http or https - all you'll get is the
        > resulting html code.
        >
        > To get the source you need use ftp.[/color]

        Well this is what i meant, i need to get resulting php code from https
        site, but i donno how.

        Comment

        • Netko

          #5
          Re: Savin webpages

          Datuma Thu, 23 Feb 2006 20:49:21 +0100, Netko je napisao\la:

          [color=blue]
          > Well this is what i meant, i need to get resulting php code from https
          > site, but i donno how.[/color]

          Sorry, resulting html code, not php

          Comment

          • Steve

            #6
            Re: Savin webpages

            [color=blue]
            > I am new to php, and i would like to ask you how can i save some
            > webpage(source code) in a file?
            >
            > I know how to do it with http sites, but i cant get it to work with https
            > sites[/color]

            See these threads:
            <http://groups.google.c o.uk/group/comp.lang.php/search?group=co mp.lang.php&q=f open+SSL&qt_g=1 &searchnow=Sear ch+this+group>

            ---
            Steve

            Comment

            • Netko

              #7
              Re: Savin webpages

              Datuma 23 Feb 2006 12:46:35 -0800, Steve je napisao\la:

              [color=blue]
              > See these threads:
              > <http://groups.google.c o.uk/group/comp.lang.php/search?group=co mp.lang.php&q=f open+SSL&qt_g=1 &searchnow=Sear ch+this+group>
              >[/color]
              Thank you, i found the solution, it seems i just had to make script to
              emulate IE

              Comment

              Working...