By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,630 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,630 IT Pros & Developers. It's quick & easy.

Saving content of Html page in another server

P: n/a
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.ca?

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

Rene Aube
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
In article <2d**************************@posting.google.com >, re*******@gnb.ca
(Rene Aube) writes:
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 you have access to server side javascript, sure. But javascript executed in
the browser has no access to write files on the server.
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.
Modify the script that puts it in the database so that it reads what you are
wanting to save, and then puts it in the database.
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.
See above, or you can write a form script that does it on the server, but
client side javascript has no way to write files on the server.
Could you send your suggestions to re*******@gnb.ca?


No thanks. See the group FAQ, paragraph 6, line 1:

http://www.jibbering.com/faq/#FAQ2_3

--
Randy
Jul 20 '05 #2

P: n/a
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).
Jul 20 '05 #3

P: n/a
In article <4c**************************@posting.google.com >,
is****@hotmail.com says...
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?

--
Hywel I do not eat quiche
http://hyweljenkins.co.uk/
http://hyweljenkins.co.uk/mfaq.php
Jul 20 '05 #4

P: n/a

"Rene Aube" <re*******@gnb.ca> wrote in message
news:2d**************************@posting.google.c om...
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.ca?

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
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.