Jump to content


Photo

Is There a Way....???


  • Please log in to reply
4 replies to this topic

#1 BrotherLogic

BrotherLogic
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 17 August 2006 - 08:12 PM

PROBLEM:

I am currently writing a PHP program that rips data from a popular site. I am then uploading this data into a MySQL database on my server. The problem is that there is about 200 - 250 page reloads (on this sites server) when the script is activated. I think they are cutting me off at about 25 - 30 page reloads. Needless to say I'm only getting a fraction of the information I need at one time. I have talked to the company and they do not mind me ripping the data as long as it does not backup their servers (completely understandable).

SOLUTION:

The solution I have come up with is to break the script into 20 - 30 different scripts that rip the data at different times throughout the day. This way there is only 10 page reloads per activivation of the script. Since there is no possible way to activate the script manually 30 times throughout the day to get all of the necessary data. This brings me to my question:

QUESTION/FIX:

Can a .php script be activated automatically at a precise time that is set on a given day? (i.e. www.yourname.com/update.php will be loaded at 6:30 PM EST, on MON, WED, and FRI)?

#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,021 posts

Posted 17 August 2006 - 08:20 PM

http://www.webmaster...om/t/cron.shtml
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#3 BrotherLogic

BrotherLogic
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 17 August 2006 - 08:23 PM

I forgot to add that I am running a windows IIS 6.0 server... Is there a CronTab like solution for Windows Server 2003?

#4 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,021 posts

Posted 17 August 2006 - 08:28 PM

There's a program called "wincron" which works well. Use Google.

There is also the in-built window scheduler using the AT command but I find wincron is a lot easier.
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#5 BrotherLogic

BrotherLogic
  • Members
  • PipPip
  • Member
  • 22 posts

Posted 17 August 2006 - 08:32 PM

Thanks a Bunch Barand...

Big Help.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users