Greetings all, and thanks in advance to anyone taking the time to read this. . .double thanks if you post a reply.
That being said, I'm having to screen scrape a website that is linked to my uncle's business' inventory database. On his normal website, it checks in w/ the server at his business every night and updates product prices on a nightly basis. The people that setup his business software also setup his website. So I don't want to mess w/ anything there. Problem is, his website sucks.
So I've made an alternate site he hopes to use that looks great, and I'm using PHP w/ CURL to scrape his website. My site basically works like this:
1) Visitor clicks link to a catalog section
2) If they're the first visitor that day to visit that page, then the screen scape is performed to get that pages info from the other site, and is then cached and served to all other visitors that day. This happens every day and is how I'm able to keep my site updated and in sync w/ his other website and business.
The problem is, it takes forever if you're the first person to click that link that day. 20-30 seconds sometimes. After it's cached, it's fast.
So, I'm wondering how I would go about automating the first click on every catalog link to occur at 7am in the morning. That way, the site is current, updated, and cached before the first visitor even comes that day, drastically increasing my load time. The main reason I need to do this is b/c I think Google is penalizing the site b/c it takes so long to load.
I've thought a cron job might do it, but I don't know anything about them really, so I have no idea how to set it up.
Any help would be greatly appreciated!
Thanks in advance!