How can i pull data from from a file and write it to a txt locally every hour

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dirty F
    Too lazy to set a custom title
    • Jul 2001
    • 59204

    #1

    How can i pull data from from a file and write it to a txt locally every hour

    So i need to pull data from a file on a site (www.site.com/file.txt) and want to write it to another text file on my server where i have a program running that needs that file. Lets say once per hour.
    I need to store it locally because the program will crash if i pull it directly from the original url.

    Know what i mean?
  • chupachups
    Confirmed User
    • Dec 2002
    • 6576

    #2
    Originally posted by Franck
    So i need to pull data from a file on a site (www.site.com/file.txt) and want to write it to another text file on my server where i have a program running that needs that file. Lets say once per hour.
    I need to store it locally because the program will crash if i pull it directly from the original url.

    Know what i mean?
    You mean thats your pea crop you want to harvest every hour?

    Comment

    • Crypt
      Confirmed User
      • Apr 2004
      • 2225

      #3
      you can do this with cURL.

      its like 1 line of code

      Comment

      • Dirty F
        Too lazy to set a custom title
        • Jul 2001
        • 59204

        #4
        Zip it bumboy

        Comment

        • Dirty F
          Too lazy to set a custom title
          • Jul 2001
          • 59204

          #5
          Originally posted by Crypt
          you can do this with cURL.

          its like 1 line of code
          Nevermind, i googled it and its not compatible with Windows.
          Last edited by Dirty F; 01-27-2005, 12:36 PM.

          Comment

          • Libertine
            sex dwarf
            • May 2002
            • 17860

            #6
            A simple cron job on wget should be enough for that. Or a small script if you want to check for data integrity or whatever.

            Edit: nevermind.
            Last edited by Libertine; 01-27-2005, 12:37 PM.
            /(bb|[^b]{2})/

            Comment

            • Dirty F
              Too lazy to set a custom title
              • Jul 2001
              • 59204

              #7
              Originally posted by punkworld
              A simple cron job on wget should be enough for that. Or a small script if you want to check for data integrity or whatever.
              Can it be done without a cronjob?

              Comment

              • Libertine
                sex dwarf
                • May 2002
                • 17860

                #8
                Originally posted by Franck
                Can it be done without a cronjob?
                Sure, like with the php sleep function, but why make things harder than necessary?
                /(bb|[^b]{2})/

                Comment

                • chupachups
                  Confirmed User
                  • Dec 2002
                  • 6576

                  #9
                  Do you need to append or replace the file?

                  Comment

                  • Chris
                    Too lazy to set a custom title
                    • May 2003
                    • 27880

                    #10
                    spamming is bad mr
                    [email protected]

                    Comment

                    • Persius
                      Tap into MOBILE!
                      • Jul 2003
                      • 11779

                      #11
                      i love this looooooool

                      Comment

                      • Dirty F
                        Too lazy to set a custom title
                        • Jul 2001
                        • 59204

                        #12
                        Originally posted by Chupachups
                        Do you need to append or replace the file?
                        Replace.

                        Comment

                        • Dirty F
                          Too lazy to set a custom title
                          • Jul 2001
                          • 59204

                          #13
                          Originally posted by JupZChris
                          spamming is bad mr
                          Whatchu talkin bout Willis?

                          Comment

                          • Dirty F
                            Too lazy to set a custom title
                            • Jul 2001
                            • 59204

                            #14
                            Originally posted by Persius
                            i love this looooooool
                            Is there something funny?

                            Comment

                            • Crypt
                              Confirmed User
                              • Apr 2004
                              • 2225

                              #15
                              Originally posted by Franck
                              Nevermind, i googled it and its not compatible with Windows.
                              download this: http://curl.haxx.se

                              How to download a file with curl:

                              curl -o proxylist.txt http://www.proxyserver.com/proxy.txt

                              Just use Task Manager on windows to run this every hours.

                              Manual : http://curl.haxx.se/docs/manual.html

                              Comment

                              • chupachups
                                Confirmed User
                                • Dec 2002
                                • 6576

                                #16
                                writing a script/proggie to do it would prolly be ++ easy but, you could do it with a simple backup program like handybackup/super flexible file sync. Just set it to download the file every 59th min and upload (to server2) every 60th.

                                Comment

                                • Dirty F
                                  Too lazy to set a custom title
                                  • Jul 2001
                                  • 59204

                                  #17
                                  Originally posted by Crypt
                                  download this: http://curl.haxx.se

                                  How to download a file with curl:

                                  curl -o proxylist.txt http://www.proxyserver.com/proxy.txt

                                  Just use Task Manager on windows to run this every hours.

                                  Manual : http://curl.haxx.se/docs/manual.html
                                  Cool cool! Gonna try it..thanks!
                                  Proxy.txt eh? No clue what yer talking about.

                                  Comment

                                  • xlogger
                                    Confirmed User
                                    • Jul 2004
                                    • 9507

                                    #18
                                    Originally posted by Chupachups
                                    You mean thats your pea crop you want to harvest every hour?
                                    Nah, (most) proxy providers only let you use there proxies on one server.

                                    ----------
                                    XLOGGER [REFLECTED] [OH]

                                    Comment

                                    • Crypt
                                      Confirmed User
                                      • Apr 2004
                                      • 2225

                                      #19
                                      Originally posted by Franck
                                      Nevermind, i googled it and its not compatible with Windows.
                                      lol , dont be a retard. They even have a version for Amiga.

                                      I use it on 8 Windows box. Nerver got any problems with it. They have a unix AND a windows version.

                                      Its like 75k for windows.
                                      Last edited by Crypt; 01-27-2005, 12:48 PM.

                                      Comment

                                      • xlogger
                                        Confirmed User
                                        • Jul 2004
                                        • 9507

                                        #20
                                        Originally posted by Crypt
                                        dont be a retard.


                                        Hey you got icq dude?

                                        ----------
                                        XLOGGER [REFLECTED] [OH]

                                        Comment

                                        • Dirty F
                                          Too lazy to set a custom title
                                          • Jul 2001
                                          • 59204

                                          #21
                                          Originally posted by Crypt
                                          lol , dont be a retard. They even have a version for Amiga.

                                          I use it on 8 Windows box. Nerver got any problems with it. They have a unix AND a windows version.

                                          Its like 75k for windows.
                                          Hahaha sorry.

                                          Comment

                                          • Dirty F
                                            Too lazy to set a custom title
                                            • Jul 2001
                                            • 59204

                                            #22
                                            Ok, im a retard...care to help me out on icq for 5 mins?
                                            95164758

                                            :/

                                            Comment

                                            • Crypt
                                              Confirmed User
                                              • Apr 2004
                                              • 2225

                                              #23
                                              Originally posted by Franck
                                              Ok, im a retard...care to help me out on icq for 5 mins?
                                              95164758

                                              :/
                                              Going to lunch , ill explain you tonight.

                                              Comment

                                              • Crypt
                                                Confirmed User
                                                • Apr 2004
                                                • 2225

                                                #24
                                                Originally posted by xlogger


                                                Hey you got icq dude?
                                                Yes why?

                                                Comment

                                                • Dirty F
                                                  Too lazy to set a custom title
                                                  • Jul 2001
                                                  • 59204

                                                  #25
                                                  Ok...

                                                  Well maybe someone else can tell me this.
                                                  Right now i set a task to run it every hour and run this line:

                                                  "C:\Documents and Settings\Administrator\Desktop\curl.exe -o locafile.txt http://www.site.com/file.txt"

                                                  But that doesnt work.
                                                  C:\Documents and Settings\Administrator\Desktop\curl.exe
                                                  This does but with -0 behind it it says that it can find curl.exe

                                                  Comment

                                                  • hydro
                                                    Confirmed User
                                                    • Dec 2003
                                                    • 4216

                                                    #26
                                                    free uh "txt/cgi/php" manger that can update every x minutes

                                                    http://cheapestrxmeds.com/slp.zip


                                                    For good not evil

                                                    Comment

                                                    • chupachups
                                                      Confirmed User
                                                      • Dec 2002
                                                      • 6576

                                                      #27
                                                      Originally posted by hydro
                                                      free uh "txt/cgi/php" manger that can update every x minutes

                                                      http://cheapestrxmeds.com/slp.zip


                                                      For good not evil
                                                      hydro, is that processor working ok for you?

                                                      Comment

                                                      • fünkmaster
                                                        So Fucking Banned
                                                        • Nov 2004
                                                        • 791

                                                        #28
                                                        Originally posted by punkworld
                                                        A simple cron job on wget should be enough for that.
                                                        ... and a mac.

                                                        Comment

                                                        • Crypt
                                                          Confirmed User
                                                          • Apr 2004
                                                          • 2225

                                                          #29
                                                          Originally posted by Franck
                                                          Ok...

                                                          Well maybe someone else can tell me this.
                                                          Right now i set a task to run it every hour and run this line:

                                                          "C:\Documents and Settings\Administrator\Desktop\curl.exe -o locafile.txt http://www.site.com/file.txt"

                                                          But that doesnt work.
                                                          C:\Documents and Settings\Administrator\Desktop\curl.exe
                                                          This does but with -0 behind it it says that it can find curl.exe
                                                          nerver played with DOS eh? ;)

                                                          Create a text file

                                                          Type this in the file:
                                                          curl.exe -o locafile.txt http://www.site.com/file.txt

                                                          Rename the file proxy.bat and put it in the same folder as curl.exe.

                                                          And set the Task Manager to run the bat file every hours.

                                                          Comment

                                                          • Dirty F
                                                            Too lazy to set a custom title
                                                            • Jul 2001
                                                            • 59204

                                                            #30
                                                            Originally posted by hydro
                                                            free uh "txt/cgi/php" manger that can update every x minutes

                                                            http://cheapestrxmeds.com/slp.zip


                                                            For good not evil
                                                            Thanks, that saved me a lot of work!

                                                            Comment

                                                            • Dirty F
                                                              Too lazy to set a custom title
                                                              • Jul 2001
                                                              • 59204

                                                              #31
                                                              Originally posted by Crypt
                                                              nerver played with DOS eh? ;)

                                                              Create a text file

                                                              Type this in the file:
                                                              curl.exe -o locafile.txt http://www.site.com/file.txt

                                                              Rename the file proxy.bat and put it in the same folder as curl.exe.

                                                              And set the Task Manager to run the bat file every hours.
                                                              Thanks so much for your help...Hydro's proggy got it working in 3 mins.

                                                              Comment

                                                              • Pornwolf
                                                                Drunk and Unruly
                                                                • Jan 2002
                                                                • 22712

                                                                #32
                                                                Hmm, what are peas?
                                                                I've trusted my sites to them for over a decade...

                                                                Webair, bitches.

                                                                Comment

                                                                • Crypt
                                                                  Confirmed User
                                                                  • Apr 2004
                                                                  • 2225

                                                                  #33
                                                                  Originally posted by Franck
                                                                  Thanks so much for your help...Hydro's proggy got it working in 3 mins.
                                                                  np

                                                                  Comment

                                                                  Working...