473,396 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Javascript to capture HTTP data for parsing

I am trying to write a script which will allow me to read the contents of an
HTTP web page into memory, parse the data, and output a calculated value.

The HTTP page is on a web enable appliance - I am reading some data out of a
table for further calculation. I can't modify the web appliance, only read
the text data.

I've written a script on my Windoze PC that successful uses a MSXML2 ActiveX
object to read the contents of a web page into memory using the
xmlhttp.responseText object. The problem is that the ActiveX object is not
available on a lightweight Linux based http server.

I need to write a script that will work with ASP/Javascript on a lightweight
Linux based http server.

Anybody have any recommendations?
Feb 18 '07 #1
4 2033
VK
On Feb 18, 7:15 pm, "Epictitus" <mikeNOSPAMster...@gmail.comwrote:
I am trying to write a script which will allow me to read the contents of an
HTTP web page into memory, parse the data, and output a calculated value.

The HTTP page is on a web enable appliance - I am reading some data out of a
table for further calculation. I can't modify the web appliance, only read
the text data.

I've written a script on my Windoze PC that successful uses a MSXML2 ActiveX
object to read the contents of a web page into memory using the
xmlhttp.responseText object. The problem is that the ActiveX object is not
available on a lightweight Linux based http server.

I need to write a script that will work with ASP/Javascript on a lightweight
Linux based http server.
I am a bit confused: where is that "lightweight Linux based http
server"? You mean that "web enable appliance" is running under that
server and you need to read data from it into some conventional
browser? Or you mean that some client is running under "lightweight
Linux based http server" and she need to read data from your appliance?

Feb 18 '07 #2
web based appliance = industrial modem (data server)
* I can access the modem via a web interface to view communications data
* the data posted by the modem needs to be used for some calculations and
formatting

lightweight linux http server = router (client/server)
* I have a router I can program custom javascript and asp scripts
* I want to make a web page that summarizes data from the modem and other
devices

"VK" <sc**********@yahoo.comwrote in message
news:11********************@v45g2000cwv.googlegrou ps.com...
On Feb 18, 7:15 pm, "Epictitus" <mikeNOSPAMster...@gmail.comwrote:
>I am trying to write a script which will allow me to read the contents of
an
HTTP web page into memory, parse the data, and output a calculated value.

The HTTP page is on a web enable appliance - I am reading some data out
of a
table for further calculation. I can't modify the web appliance, only
read
the text data.

I've written a script on my Windoze PC that successful uses a MSXML2
ActiveX
object to read the contents of a web page into memory using the
xmlhttp.responseText object. The problem is that the ActiveX object is
not
available on a lightweight Linux based http server.

I need to write a script that will work with ASP/Javascript on a
lightweight
Linux based http server.

I am a bit confused: where is that "lightweight Linux based http
server"? You mean that "web enable appliance" is running under that
server and you need to read data from it into some conventional
browser? Or you mean that some client is running under "lightweight
Linux based http server" and she need to read data from your appliance?

Feb 18 '07 #3
VK
On Feb 18, 11:53 pm, "Epictitus" <mikeNOSPAMster...@gmail.comwrote:
web based appliance = industrial modem (data server)
* I can access the modem via a web interface to view communications data
* the data posted by the modem needs to be used for some calculations and
formatting

lightweight linux http server = router (client/server)
* I have a router I can program custom javascript and asp scripts
* I want to make a web page that summarizes data from the modem and other
devices
Unless I'm still missing the picture the only problem is to be able to
make GET request to your modem: directly or over the router's layer.

After all the data is retrieved for a fat client (full-scaled UA) so
all logic can be moved onto the client:

UA (browser) with ajaxoid and DOM scripting
| |
GET request for text/plain, text/xml or text/html
| |
router
| |
web-enabled device

So within your current network are you able to put such requests? If
yes than your router capabilities are irrelevant for the task, let's
talk about client-side scripting.

If you want to use your router as an intermediary server (a la "star"
network) like

device device
| |
router ... multiple HTTP clients
| |
device device

then really javascript has nothing to do with it. Theoretically you
may install some whitebeam-like engine for server-side javascript on
your router (??) but practically just make a conventional server-side
solution.

Feb 18 '07 #4
Thanks VK. What I'm trying to do is called "scraping". I've found a lot of
"packages" which could be installed but I'm looking for a lightweight,
simple solution.

My problem is that my router is limited in memory, available apps etc. and I
don't have Perl/Ajax installed. I do have Javascript (server and client
side) and asp.


"VK" <sc**********@yahoo.comwrote in message
news:11*********************@p10g2000cwp.googlegro ups.com...
On Feb 18, 11:53 pm, "Epictitus" <mikeNOSPAMster...@gmail.comwrote:
>web based appliance = industrial modem (data server)
* I can access the modem via a web interface to view communications data
* the data posted by the modem needs to be used for some calculations and
formatting

lightweight linux http server = router (client/server)
* I have a router I can program custom javascript and asp scripts
* I want to make a web page that summarizes data from the modem and other
devices

Unless I'm still missing the picture the only problem is to be able to
make GET request to your modem: directly or over the router's layer.

After all the data is retrieved for a fat client (full-scaled UA) so
all logic can be moved onto the client:

UA (browser) with ajaxoid and DOM scripting
| |
GET request for text/plain, text/xml or text/html
| |
router
| |
web-enabled device

So within your current network are you able to put such requests? If
yes than your router capabilities are irrelevant for the task, let's
talk about client-side scripting.

If you want to use your router as an intermediary server (a la "star"
network) like

device device
| |
router ... multiple HTTP clients
| |
device device

then really javascript has nothing to do with it. Theoretically you
may install some whitebeam-like engine for server-side javascript on
your router (??) but practically just make a conventional server-side
solution.

Feb 19 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: annoyingmouse2002 | last post by:
Hi there, sorry if this a long post but I'm really just starting out. I've been using MSXML to parse an OWL but would like to use a different solution. Basically it reads the OWL (Based on XML)...
12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
53
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
7
by: Eric Osman | last post by:
If my question sounds ill-formed, please cut me some slack as I'm just getting started with this part of the code. We're trying to do an axis soap interface, that is, talk to a site that already...
8
by: Nehmo | last post by:
When a page has a JavaScript "link" to a video, like http://www.msnbc.msn.com/id/10478942/ . How do you get the URL of the actual video? Isn't it in the source somewhere? -- )|:__ Nehmo __:|(
2
by: eBob.com | last post by:
I am using regular expressions and a particular feature called "capture" (I think) to suck some information out of some html. I could have never come up with this myself but Balena has an example...
0
by: Laszlo Nagy | last post by:
John Chandler wrote: - Use firefox :-) - Install "LiveHTTPHeaders" http://livehttpheaders.mozdev.org/ - Open the plugin in one window and the website in another - Enable "capture" in...
19
by: maya | last post by:
hi, so what is "modern" javascript?? the same as "DOM-scripting"? i.e., editing content (or changing appearance of content) dynamically by massaging javascript objects, html elements, etc? ...
1
by: Philip Semanchuk | last post by:
On Oct 12, 2008, at 5:25 AM, S.Selvam Siva wrote: Selvam, You can try to find them yourself using string parsing, but that's difficult. The closer you want to get to "perfect" at finding URLs...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.