"Rene Aube" <re*******@gnb. ca> wrote in message
news:2d******** *************** ***@posting.goo gle.com...
Hi everyone,
I'm incharge of updating the stats on a chl hockey teams Web Site. I
would like to know if there is a way (javascript) to be able to save
the content of the CHL Statistics WebPage on our Server with
Javascript, in a txt file.
If it possible, then I would take the content of that page. Execute
another script that will take this information an place it in our
database on our server. By doing this, our Team WebSite would be
update automaticaly.
At this time, I have to open the CHL Statistics WebPage. Then Save the
HTML page as a txt file, upload it on our server via FTP, then execute
my script that places it in our database.
Could you send your suggestions to re*******@gnb.c a?
Any help would be greatly appreciated and Thank You in advance.
Rene Aube
JavaScript is typically used in client-side applictions, in the browser.
What you are looking for is a server-side method for storing the data, and
reformatting it for the user. Do a search for CGI, ASP, PHP, or any other
server-side scripting technology. There exist Javascript server-side
engines, but that is not likely the answer you are looking for.
Getting the data from CHL to your database may be the trickiest... in that
case, if they do it in a constant way, you could write a tool using HTA
(Search MS's website for it) to load the CHL page in one frame, and the
other frame, use a script to pull the data out. The script would then use
some sort of CGI technology (ASP, PHP, Perl, etc) to put the data directly
into your database. Then, the users of your site will access another CGI
app that goes into your database, and formats the data in a page, the way
you want it to.
There are other server-side methods that can be used to get the data, like
having the server download the page, parse it with something like Tidy, and
pull the data out of the DOM model, and put into the database. This tool
could be run by a Cron job, or something similar...
Just some ideas,
Brian