473,761 Members | 2,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.respons eText 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 2060
VK
On Feb 18, 7:15 pm, "Epictitus" <mikeNOSPAMster ...@gmail.comwr ote:
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.respons eText 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 "lightweigh t 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 "lightweigh t
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**********@y ahoo.comwrote in message
news:11******** ************@v4 5g2000cwv.googl egroups.com...
On Feb 18, 7:15 pm, "Epictitus" <mikeNOSPAMster ...@gmail.comwr ote:
>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.respon seText 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 "lightweigh t 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 "lightweigh t
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.comwr ote:
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**********@y ahoo.comwrote in message
news:11******** *************@p 10g2000cwp.goog legroups.com...
On Feb 18, 11:53 pm, "Epictitus" <mikeNOSPAMster ...@gmail.comwr ote:
>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
4261
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) and puts values in a number of arrays and then puts the contents of the array in a HTML table. I'd like to keep the array structure. I've checked out all sorts of different javascript parsers but have not met with a great deal of success with any...
12
6558
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 courses to pass the correct option value and then be displayed at the following URL: http://www.dslextreme.com/users/kevinlyons/selectResults.html I am passing countries, products, and courses. The first two display
53
5741
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 difficult to know what is going on. One of these Order Forms you can see here... http://www.cardman.co.uk/orderform.php3
7
3063
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 has a defined "dtd" . I've already seen some java examples that use SOAP and AXIS to do the communication. However, we'd like to communicate from client-side javascript instead of
8
3665
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
1384
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 which is very similar to this. The guts of the program is ... Dim i As Integer Dim rgx As Regex Dim Pattern As String = "<td class=td1 width=""35%"">(<b>){0,1}(?<variable>(\w| )+)</td>" + _
0
813
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 livehttpheaders (default) - Login to the website - Disable "capture" in livehttpheaders (default) - Check the GET and POST requests in the capture log - Try to send the same GET and POST requests from Python. - Don't forget that most sites will also need...
19
2235
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? (in conjunction with css, you know, the usual...;) this is what is meant by "modern" javascript?? so how do folks feel about this who think javascript is so evil they disable it from their browsers?? do sites designed with "modern" javascript...
1
2878
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 expressed in JS, the closer you'll get to rewriting a JS interpreter. For instance, this is not so hard to understand: "http://example.com/" but this is:
0
9522
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9336
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10111
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9948
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6603
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5364
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3866
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3446
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2738
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.