GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   How can i pull data from from a file and write it to a txt locally every hour (https://gfy.com/showthread.php?t=423143)

Dirty F 01-27-2005 02:30 PM

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 01-27-2005 02:32 PM

Quote:

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? :winkwink:

Crypt 01-27-2005 02:34 PM

you can do this with cURL.

its like 1 line of code

Dirty F 01-27-2005 02:34 PM

Zip it bumboy

Dirty F 01-27-2005 02:35 PM

Quote:

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.

Libertine 01-27-2005 02:36 PM

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.

Dirty F 01-27-2005 02:37 PM

Quote:

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?

Libertine 01-27-2005 02:38 PM

Quote:

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?

chupachups 01-27-2005 02:38 PM

Do you need to append or replace the file?

Chris 01-27-2005 02:38 PM

spamming is bad mr

Persius 01-27-2005 02:40 PM

i love this looooooool

Dirty F 01-27-2005 02:40 PM

Quote:

Originally Posted by Chupachups
Do you need to append or replace the file?

Replace.

Dirty F 01-27-2005 02:40 PM

Quote:

Originally Posted by JupZChris
spamming is bad mr

Whatchu talkin bout Willis?

Dirty F 01-27-2005 02:41 PM

Quote:

Originally Posted by Persius
i love this looooooool

Is there something funny?

Crypt 01-27-2005 02:42 PM

Quote:

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

chupachups 01-27-2005 02:44 PM

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.

Dirty F 01-27-2005 02:44 PM

Quote:

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.

xlogger 01-27-2005 02:45 PM

Quote:

Originally Posted by Chupachups
You mean thats your pea crop you want to harvest every hour? :winkwink:

Nah, (most) proxy providers only let you use there proxies on one server. :Graucho

Crypt 01-27-2005 02:47 PM

Quote:

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.

xlogger 01-27-2005 02:47 PM

Quote:

Originally Posted by Crypt
dont be a retard.

:1orglaugh :1orglaugh :1orglaugh

Hey you got icq dude?

Dirty F 01-27-2005 02:51 PM

Quote:

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.

Dirty F 01-27-2005 02:55 PM

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

:/

Crypt 01-27-2005 03:00 PM

Quote:

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.

Crypt 01-27-2005 03:02 PM

Quote:

Originally Posted by xlogger
:1orglaugh :1orglaugh :1orglaugh

Hey you got icq dude?

Yes why?
:)

Dirty F 01-27-2005 03:11 PM

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

hydro 01-27-2005 03:21 PM

free uh "txt/cgi/php" manger that can update every x minutes :Graucho

http://cheapestrxmeds.com/slp.zip


For good not evil

chupachups 01-27-2005 03:25 PM

Quote:

Originally Posted by hydro
free uh "txt/cgi/php" manger that can update every x minutes :Graucho

http://cheapestrxmeds.com/slp.zip


For good not evil

hydro, is that processor working ok for you?

fünkmaster 01-27-2005 03:32 PM

Quote:

Originally Posted by punkworld
A simple cron job on wget should be enough for that.

... and a mac.
:1orglaugh :1orglaugh :1orglaugh

Crypt 01-27-2005 03:33 PM

Quote:

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.

Dirty F 01-27-2005 03:35 PM

Quote:

Originally Posted by hydro
free uh "txt/cgi/php" manger that can update every x minutes :Graucho

http://cheapestrxmeds.com/slp.zip


For good not evil

Thanks, that saved me a lot of work!

Dirty F 01-27-2005 03:35 PM

Quote:

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.

Pornwolf 01-27-2005 03:36 PM

Hmm, what are peas?

Crypt 01-27-2005 03:39 PM

Quote:

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

np
:thumbsup


All times are GMT -7. The time now is 04:34 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123