Saving content of Html page in another server

R

Rene Aube

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 (e-mail address removed)?

Any help would be greatly appreciated and Thank You in advance.

Rene Aube
 
B

Brian Genisio

Rene Aube said:
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 (e-mail address removed)?

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
 
L

Lucanus

What kind of Database system are you using?
Some (like FileMaker), dependant on their version can be programmed to
fetch and import data like this automatically.

It just sounds a bit unusual that you want to use JavaScript (which,
from my understanding is more tailored towards manipulating the user's
interface rather than doing work on the server).
 
H

Hywel Jenkins

What kind of Database system are you using?
Some (like FileMaker), dependant on their version can be programmed to
fetch and import data like this automatically.

It just sounds a bit unusual that you want to use JavaScript (which,
from my understanding is more tailored towards manipulating the user's
interface rather than doing work on the server).
Are you replying to something? If you are, what? How about quoting?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top