/    Sign up×
Community /Pin to ProfileBookmark

Storing and re-capturing search count

I have a site were I use cURL to bring the contents of a client’s site into another aspect of the site. One of the things I am doing is custom searches.
There are state (and country) links that then bring up category links. When the category is selected, the sub-cats show up. Then when you click the sub-cat, it shows your search results. One line in the search results displays the number of results. I don’t have direct access to the database on this part of the site, so my only choice is to scrape it.

What I want to do is make a script that once a day will go through each state (and country) and strip out that number and store it. When the categories are displayed, it will show how many matches are in all the subcats combined for that category and state (or country). When the subcats are displayed, the number of matches for that sub-cat are displayed.

My first thought was a flat file system, but I have not worked with them a whole lot, and I think it could get hairy. There are dozens of categories, and some have dozens of subcats.

I could set up a MySQL database, but again, not sure the best route.

Any suggestions? I am not asking for code, but rather an outline of how you might handle it.

Thanks,
TecBrat.

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@scragarAug 27.2008 — XML?

if you keep to simpleXML it should be fairly easy to set up and run, your only risk will be it's size and the ram it could eat up.
×

Success!

Help @TecBrat spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...