Solved

How do i return text through http without viewing the contents in a browser window?

Posted on 2006-11-13
10
872 Views
Last Modified: 2011-09-20
Hi,

Is it feasible to extract text from an http url without actually opening it in a browser?


For example,

http://%computername%:9495

In my environment, typing this address and port into IE 6 will display a status-report for a service / client running on that machine (for info, Tivoli Endpoint).

If we could 'pull' this information from a batch of machines in text-file format, we can create a VBScript file to query this information and produce a general report on the service-status for that client.

Any suggestions or advice would be greatly appreciated.

Regards.
0
Comment
Question by:Timmmo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 28

Expert Comment

by:FishMonger
ID: 17931486
You didn't say which lanuage you want to use to do the file retrieval.  Here's a perl example that retieves this EE page and stores it in a file named Q_22058385.html.

#!/usr/bin/perl -w

use strict;
use LWP::Simple;

my $url = 'http://www.experts-exchange.com/Web/Web_Languages/Q_22058385.html';
getstore($url, 'Q_22058385.html');
0
 
LVL 28

Assisted Solution

by:FishMonger
FishMonger earned 250 total points
ID: 17931533
I left out the portion of looping through a list of url's because you weren't very clear on how that info is stored, looping over the contents of a file containing a of list of urls is very easy.
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 250 total points
ID: 17979471
Seems VBScript is the language of choice

http://www.google.com/search?q=vbscript+http+get
0
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
LVL 5

Expert Comment

by:mrneilbarton
ID: 18007730
An ASP example would be somethink like below:

<%
    url = "http://%computername%:9495
    set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")  

    xmlhttp.open "GET", url, false
    xmlhttp.send "" 
    thetxt = xmlhttp.responseText
%>

The above bit of script would  load it into the variable "thetxt" which you can publish into the page where ever you need it.
0
 

Author Comment

by:Timmmo
ID: 18020012
I chose mplungjan's answer because he correctly surmised Vbscript (although I did hint this was the language in the question). Secondly, mplungjan forced me to do some further investigation and the link was a good starting point.  Fishmonger also received points for the effort, although it was not exactly what I was looking for.

Thanks.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 18021085
1. My comment about vbscript was to FishMonger
2. I do not want a "C" grade for a comment. Either you could use the link or you could not. Great you solved the problem but a "C" grade is not acceptable to me.

I will ask for the question to be unaccepted so you can change the grade or leave my comment out of it.

Please look here: http://www.experts-exchange.com/help.jsp#hi73

Michel
0
 
LVL 28

Expert Comment

by:FishMonger
ID: 18021418
I agree with mplungjan, a “C” grade is unwarranted.  In this forum, a “C” grade is considered by most to be a “failing” grade.

My post showed how to retrieve a file from the web without opening the browser.  Your question gave no indication of which language you wanted for that portion of the problem.  Your hint at using Vbscript appeared to be for the processing and generating of a report from the file once it was retrieved.  Perl (Practical Extraction and Reporting Language) would be better suited for that processing, but I left that out because you wanted to go the Vbscript route for that portion.

You should have posted a follow up comment giving more details of what you wanted and why you were not satisfied with the proposed solutions.  Instead, you left us hanging for 2 weeks without posting anything.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 18028194
Thanks PashaMod
0
 
LVL 28

Expert Comment

by:FishMonger
ID: 18029410
The "B" grade is fine with me, thanks.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you work with shopping cart / ecommerce relates web sites, you need to pass the certain form post details to the payment gateway process page with required details for the products items you give to order. Also you may need to track the ordered…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question