Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 01-27-2005, 02:30 PM   #1
Dirty F
Too lazy to set a custom title
 
Dirty F's Avatar
 
Industry Role:
Join Date: Jul 2001
Posts: 59,204
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?
Dirty F is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:32 PM   #2
chupachups
Confirmed User
 
chupachups's Avatar
 
Join Date: Dec 2002
Location: Sweden/Spain you sum bitch!
Posts: 6,576
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?
__________________
chupachups is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:34 PM   #3
Crypt
Confirmed User
 
Join Date: Apr 2004
Posts: 2,225
you can do this with cURL.

its like 1 line of code
Crypt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:34 PM   #4
Dirty F
Too lazy to set a custom title
 
Dirty F's Avatar
 
Industry Role:
Join Date: Jul 2001
Posts: 59,204
Zip it bumboy
Dirty F is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:35 PM   #5
Dirty F
Too lazy to set a custom title
 
Dirty F's Avatar
 
Industry Role:
Join Date: Jul 2001
Posts: 59,204
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.

Last edited by Dirty F; 01-27-2005 at 02:36 PM..
Dirty F is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:36 PM   #6
Libertine
sex dwarf
 
Libertine's Avatar
 
Join Date: May 2002
Posts: 17,860
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.
__________________
/(bb|[^b]{2})/

Last edited by Libertine; 01-27-2005 at 02:37 PM..
Libertine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:37 PM   #7
Dirty F
Too lazy to set a custom title
 
Dirty F's Avatar
 
Industry Role:
Join Date: Jul 2001
Posts: 59,204
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?
Dirty F is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:38 PM   #8
Libertine
sex dwarf
 
Libertine's Avatar
 
Join Date: May 2002
Posts: 17,860
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?
__________________
/(bb|[^b]{2})/
Libertine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:38 PM   #9
chupachups
Confirmed User
 
chupachups's Avatar
 
Join Date: Dec 2002
Location: Sweden/Spain you sum bitch!
Posts: 6,576
Do you need to append or replace the file?
__________________
chupachups is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:38 PM   #10
Chris
Too lazy to set a custom title
 
Chris's Avatar
 
Industry Role:
Join Date: May 2003
Location: icq: 71462500 Skype: Jupzchris
Posts: 27,880
spamming is bad mr
__________________
[email protected]
Chris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:40 PM   #11
Persius
Tap into MOBILE!
 
Industry Role:
Join Date: Jul 2003
Location: Hollywood
Posts: 11,779
i love this looooooool
Persius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:40 PM   #12
Dirty F
Too lazy to set a custom title
 
Dirty F's Avatar
 
Industry Role:
Join Date: Jul 2001
Posts: 59,204
Quote:
Originally Posted by Chupachups
Do you need to append or replace the file?
Replace.
Dirty F is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:40 PM   #13
Dirty F
Too lazy to set a custom title
 
Dirty F's Avatar
 
Industry Role:
Join Date: Jul 2001
Posts: 59,204
Quote:
Originally Posted by JupZChris
spamming is bad mr
Whatchu talkin bout Willis?
Dirty F is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:41 PM   #14
Dirty F
Too lazy to set a custom title
 
Dirty F's Avatar
 
Industry Role:
Join Date: Jul 2001
Posts: 59,204
Quote:
Originally Posted by Persius
i love this looooooool
Is there something funny?
Dirty F is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:42 PM   #15
Crypt
Confirmed User
 
Join Date: Apr 2004
Posts: 2,225
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
Crypt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:44 PM   #16
chupachups
Confirmed User
 
chupachups's Avatar
 
Join Date: Dec 2002
Location: Sweden/Spain you sum bitch!
Posts: 6,576
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.
__________________
chupachups is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:44 PM   #17
Dirty F
Too lazy to set a custom title
 
Dirty F's Avatar
 
Industry Role:
Join Date: Jul 2001
Posts: 59,204
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.
Dirty F is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:45 PM   #18
xlogger
Confirmed User
 
Join Date: Jul 2004
Location: NY
Posts: 9,507
Quote:
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]
xlogger is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:47 PM   #19
Crypt
Confirmed User
 
Join Date: Apr 2004
Posts: 2,225
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.

Last edited by Crypt; 01-27-2005 at 02:48 PM..
Crypt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:47 PM   #20
xlogger
Confirmed User
 
Join Date: Jul 2004
Location: NY
Posts: 9,507
Quote:
Originally Posted by Crypt
dont be a retard.


Hey you got icq dude?
__________________

----------
XLOGGER [REFLECTED] [OH]
xlogger is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:51 PM   #21
Dirty F
Too lazy to set a custom title
 
Dirty F's Avatar
 
Industry Role:
Join Date: Jul 2001
Posts: 59,204
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 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 02:55 PM   #22
Dirty F
Too lazy to set a custom title
 
Dirty F's Avatar
 
Industry Role:
Join Date: Jul 2001
Posts: 59,204
Ok, im a retard...care to help me out on icq for 5 mins?
95164758

:/
Dirty F is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 03:00 PM   #23
Crypt
Confirmed User
 
Join Date: Apr 2004
Posts: 2,225
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 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 03:02 PM   #24
Crypt
Confirmed User
 
Join Date: Apr 2004
Posts: 2,225
Quote:
Originally Posted by xlogger


Hey you got icq dude?
Yes why?
Crypt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 03:11 PM   #25
Dirty F
Too lazy to set a custom title
 
Dirty F's Avatar
 
Industry Role:
Join Date: Jul 2001
Posts: 59,204
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
Dirty F is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 03:21 PM   #26
hydro
Confirmed User
 
Join Date: Dec 2003
Location: Dirty 3rd
Posts: 4,216
free uh "txt/cgi/php" manger that can update every x minutes

http://cheapestrxmeds.com/slp.zip


For good not evil
hydro is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 03:25 PM   #27
chupachups
Confirmed User
 
chupachups's Avatar
 
Join Date: Dec 2002
Location: Sweden/Spain you sum bitch!
Posts: 6,576
Quote:
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?
__________________
chupachups is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 03:32 PM   #28
fünkmaster
So Fucking Banned
 
Join Date: Nov 2004
Posts: 791
Quote:
Originally Posted by punkworld
A simple cron job on wget should be enough for that.
... and a mac.
fünkmaster is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 03:33 PM   #29
Crypt
Confirmed User
 
Join Date: Apr 2004
Posts: 2,225
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.
Crypt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 03:35 PM   #30
Dirty F
Too lazy to set a custom title
 
Dirty F's Avatar
 
Industry Role:
Join Date: Jul 2001
Posts: 59,204
Quote:
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!
Dirty F is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 03:35 PM   #31
Dirty F
Too lazy to set a custom title
 
Dirty F's Avatar
 
Industry Role:
Join Date: Jul 2001
Posts: 59,204
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.
Dirty F is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 03:36 PM   #32
Pornwolf
Drunk and Unruly
 
Pornwolf's Avatar
 
Join Date: Jan 2002
Location: Hollywood
Posts: 22,712
Hmm, what are peas?
__________________
I've trusted my sites to them for over a decade...

Webair, bitches.
Pornwolf is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-27-2005, 03:39 PM   #33
Crypt
Confirmed User
 
Join Date: Apr 2004
Posts: 2,225
Quote:
Originally Posted by Franck
Thanks so much for your help...Hydro's proggy got it working in 3 mins.
np
Crypt is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.