FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > General Coding/Development
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 01-15-2002, 02:34 PM   Postid: 60219
Jeepers
Registered User

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Jun 2001
Location: richmond
Posts: 30
Is this possible at all?

Say I have a script that goes looks up a certain webpage and captures sport's scores(ie. xml).

The problem is, my script would have to direct to this certain webpage for the info, and because of this, it may be slow at times depending on how fast that webpage loads.

So my question is,

Is it possible to have a file that automatically captures another webpage every hour or so?
This way, I can direct my script to that one file instead of directing it to the webpage.


thanx
Jeepers is offline   Reply With Quote
Old 01-15-2002, 02:48 PM   Postid: 60220
bturner
Visitor
 
bturner's Avatar

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Jun 2000
Location: Dallas, TX, USA
Posts: 90
You bet! Check this thread for how to use the Perl LWP module to copy a file from another site: http://www.aota.net/forums/showthrea...threadid=10115

Set up a script to grab the XML file, and then set up a cron job to run every hour. I know there's a FAQ for cron somewhere on the FQ site.

Good luck!
Bill
bturner is offline   Reply With Quote
Old 01-15-2002, 02:53 PM   Postid: 60223
MikeGnitecki
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Aug 2001
Location: Dallas, TX
Posts: 85
The FQ page on crontab is at:

http://www.aota.net/Script_Installat.../cronhelp.php3

-Mike Gnitecki
MikeGnitecki is offline   Reply With Quote
Old 01-15-2002, 03:12 PM   Postid: 60227
 Kevin
Systems Administrator
 
Kevin's Avatar
 
Join Date: Aug 2001
Location: Orlando, FL
Posts: 2,481
You can also use the wget command (in a cron job) to accomplish this.

Just make sure that your script checks that the copy it downloads is complete and valid before overwriting the previously cached copy.
Kevin is offline   Reply With Quote
Old 01-15-2002, 05:56 PM   Postid: 60254
Rich
Merchant Rep
 
Rich's Avatar

Forum Notability:
153 pts: Ambassador of Goodwill
[Post Feedback]
 
Join Date: Nov 1998
Location: Indiana, USA
Posts: 1,658
You should also make sure that the information you are cacheing is not copyrighted or if it is, you have permission to do this if you don't own the "other" site.

Rich
Rich is offline   Reply With Quote
Old 01-16-2002, 01:55 AM   Postid: 60293
Jeepers
Registered User

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Jun 2001
Location: richmond
Posts: 30
Its a partner site.

I was thinking that its better to do an FTP push where they send upload us the xml file, but that's a lot more hassle.

Would it be good to have a cron job update every 15 minutes? or would this be too much....the file i'm getting is around 25k.
Jeepers is offline   Reply With Quote
Old 01-16-2002, 04:38 AM   Postid: 60296
 Terra
CTO FutureQuest, Inc.
 
Terra's Avatar
 
Join Date: Jun 1998
Location: Z'ha'dum
Posts: 7,674
Every 15 is fine... The ones that cause me concern are those that fire off every minute...

--
Terra
sysAdmin
FutureQuest
Terra is offline   Reply With Quote
Old 01-16-2002, 03:51 PM   Postid: 60338
Jeepers
Registered User

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Jun 2001
Location: richmond
Posts: 30
Would this be correct to have the script run every 15 minutes?

0,15,30,45 * * * * /big/dom/xdomain/cgi-bin/scriptname.cgi

Not sure if I should put anything in the hour column.
Jeepers is offline   Reply With Quote
Old 01-16-2002, 03:58 PM   Postid: 60340
 Arthur
Developer
 
Arthur's Avatar
 
Join Date: Nov 2000
Location: The Netherlands
Posts: 2,212
That's correct. You may also write it like this;
*/15 * * * * /big/dom/xdomain/cgi-bin/scriptname.cgi
Arthur is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 06:33 PM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.