wget

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

    #1

    wget

    How do I call c:\wget\wget.ex e from a php or html file? so I can use php
    variables to define the file names to download.

    I want to set up wget to download several files from a server to my hard
    drive so they can be used internally.

    Ken



  • Julien CROUZET aka c2c

    #2
    Re: wget

    "Ken" <kkrolski@wi.rr .com> pipotte et a dit :
    [color=blue]
    > How do I call c:\wget\wget.ex e from a php or html file? so I can use php
    > variables to define the file names to download.
    >
    > I want to set up wget to download several files from a server to my hard
    > drive so they can be used internally.
    >[/color]



    --
    Julien CROUZET aka c2c

    Comment

    • Ken

      #3
      Re: wget

      Thanks!

      "Julien CROUZET aka c2c" <spam@binouse.o rg> wrote in message
      news:86r7pndaco .fsf@box1.binou se.org...[color=blue]
      > "Ken" <kkrolski@wi.rr .com> pipotte et a dit :
      >[color=green]
      > > How do I call c:\wget\wget.ex e from a php or html file? so I can use php
      > > variables to define the file names to download.
      > >
      > > I want to set up wget to download several files from a server to my hard
      > > drive so they can be used internally.
      > >[/color]
      >
      > http://www.php.net/manual/en/ref.exec.php
      >
      > --
      > Julien CROUZET aka c2c[/color]


      Comment

      • Ken

        #4
        Re: wget

        Julien,

        Is shell access needed to download files using wget?


        "Julien CROUZET aka c2c" <spam@binouse.o rg> wrote in message
        news:86r7pndaco .fsf@box1.binou se.org...[color=blue]
        > "Ken" <kkrolski@wi.rr .com> pipotte et a dit :
        >[color=green]
        > > How do I call c:\wget\wget.ex e from a php or html file? so I can use php
        > > variables to define the file names to download.
        > >
        > > I want to set up wget to download several files from a server to my hard
        > > drive so they can be used internally.
        > >[/color]
        >
        > http://www.php.net/manual/en/ref.exec.php
        >
        > --
        > Julien CROUZET aka c2c[/color]


        Comment

        • steve

          #5
          Re: wget

          "Ken" wrote:[color=blue]
          > How do I call c:\wget\wget.ex e from a php or html file? so I can[/color]
          use[color=blue]
          > php
          > variables to define the file names to download.
          >
          > I want to set up wget to download several files from a server to my
          > hard
          > drive so they can be used internally.
          >
          > Ken[/color]

          Ken, as php can read remote files, why do you need to use wget? Just
          juse fopen/fread...

          --
          http://www.dbForumz.com/ This article was posted by author's request
          Articles individually checked for conformance to usenet standards
          Topic URL: http://www.dbForumz.com/PHP-wget-ftopict144855.html
          Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=485855

          Comment

          • Ken

            #6
            Re: wget

            "steve" <UseLinkToEmail @dbForumz.com> wrote in message
            news:4135101a$1 _4@alt.athenane ws.com...[color=blue]
            > "Ken" wrote:[color=green]
            > > How do I call c:\wget\wget.ex e from a php or html file? so I can[/color]
            > use[color=green]
            > > php
            > > variables to define the file names to download.
            > >
            > > I want to set up wget to download several files from a server to my
            > > hard
            > > drive so they can be used internally.
            > >
            > > Ken[/color]
            >
            > Ken, as php can read remote files, why do you need to use wget? Just
            > juse fopen/fread...[/color]

            Steve,
            I need the files on my hard drive. i use them off the web.

            Ken


            Comment

            • steve

              #7
              Re: Re: wget

              "Ken" wrote:[color=blue]
              > "steve" <UseLinkToEmail @dbForumz.com> wrote in message
              > news:4135101a[/color]
              _4@alt.athenane ws.com...[color=blue][color=green]
              > > "Ken" wrote:[color=darkred]
              > > > How do I call c:\wget\wget.ex e from a php or html file? so[/color][/color]
              > I can[color=green]
              > > use[color=darkred]
              > > > php
              > > > variables to define the file names to download.
              > > >
              > > > I want to set up wget to download several files from a[/color][/color]
              > server to my[color=green][color=darkred]
              > > > hard
              > > > drive so they can be used internally.
              > > >
              > > > Ken[/color]
              > >
              > > Ken, as php can read remote files, why do you need to use wget?[/color]
              > Just[color=green]
              > > juse fopen/fread...[/color]
              >
              > Steve,
              > I need the files on my hard drive. i use them off the web.
              >
              > Ken[/color]

              Ken, what I am suggesting is that you can fread the remote files via
              http, and then just save them to hard disk from php. It is very
              simple, and you have much better control over what is going on
              (timeout, etc.) since you are working within php.

              from the manual:

              <?php
              $handle = fopen("http://www.example.com/", "rb");
              $contents = ’’;
              while (!feof($handle) ) {
              $contents .= fread($handle, 8192);
              }
              fclose($handle) ;
              ?>

              --
              http://www.dbForumz.com/ This article was posted by author's request
              Articles individually checked for conformance to usenet standards
              Topic URL: http://www.dbForumz.com/PHP-wget-ftopict144855.html
              Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=486668

              Comment

              • Ken

                #8
                Re: Re: wget

                Thanks.

                I understand.

                Ken

                "steve" <UseLinkToEmail @dbForumz.com> wrote in message
                news:4135e9e6$1 _5@alt.athenane ws.com...[color=blue]
                > "Ken" wrote:[color=green]
                > > "steve" <UseLinkToEmail @dbForumz.com> wrote in message
                > > news:4135101a[/color]
                > _4@alt.athenane ws.com...[color=green][color=darkred]
                > > > "Ken" wrote:
                > > > > How do I call c:\wget\wget.ex e from a php or html file? so[/color]
                > > I can[color=darkred]
                > > > use
                > > > > php
                > > > > variables to define the file names to download.
                > > > >
                > > > > I want to set up wget to download several files from a[/color]
                > > server to my[color=darkred]
                > > > > hard
                > > > > drive so they can be used internally.
                > > > >
                > > > > Ken
                > > >
                > > > Ken, as php can read remote files, why do you need to use wget?[/color]
                > > Just[color=darkred]
                > > > juse fopen/fread...[/color]
                > >
                > > Steve,
                > > I need the files on my hard drive. i use them off the web.
                > >
                > > Ken[/color]
                >
                > Ken, what I am suggesting is that you can fread the remote files via
                > http, and then just save them to hard disk from php. It is very
                > simple, and you have much better control over what is going on
                > (timeout, etc.) since you are working within php.
                >
                > from the manual:
                >
                > <?php
                > $handle = fopen("http://www.example.com/", "rb");
                > $contents = ’’;
                > while (!feof($handle) ) {
                > $contents .= fread($handle, 8192);
                > }
                > fclose($handle) ;
                > ?>
                >
                > --
                > http://www.dbForumz.com/ This article was posted by author's request
                > Articles individually checked for conformance to usenet standards
                > Topic URL: http://www.dbForumz.com/PHP-wget-ftopict144855.html
                > Visit Topic URL to contact author (reg. req'd). Report abuse:[/color]



                Comment

                Working...