PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old July 21st, 2008, 03:59 PM
zargonfey zargonfey is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2008
Posts: 1 zargonfey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 28 sec
Reputation Power: 0
Archive a page?

There's a website that updates statistics approximately every hour, but they don't archive their pages so I have to physically be at my computer every time they update. I'm looking for a script that I could put on my website that would automatically visit the given URL every hour and save the page in a folder on my server.

I'd greatly appreciate it if someone could help.

Reply With Quote
  #2  
Old July 21st, 2008, 06:55 PM
IAmALlama IAmALlama is offline
Me
Click here for more information. Click here for more information
Click here for more information
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 1,907 IAmALlama User rank is Private First Class (20 - 50 Reputation Level)IAmALlama User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 4 Days 16 h 43 m 30 sec
Reputation Power: 4
if you wanted to make it automated then it would depend on your server. in linux you would have to use cron and in windows you can get wincron or use windows task scheduler. You would need to write a command line script (just make a php page that doesn't output anything to the screen and you'll be ok) and run that with the scheduler every hour.

If you don't have access to a scheduler, then you would have to be a little more creative. I made a script once that would update stats every 10 minutes. Every time a user would load the script it would take the current time and round that to the nearest 10 minute increment and check if a cache file existed for that time. If so, read the cache file, if not it would connect and download the most recent stats. I was lucky in that if no one visited for like an hour, I didn't need to get that information between visits so no cache existed or was needed, it would just load the new file for the next visitor and the cache existed for everyone after that for the next 10 minutes. Its more of a expiring cache than a scheduled run.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > Archive a page?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
Stay green...Green IT