[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2006-11-13
10
Medium Priority
?
885 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
9 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 750 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 750 total points
ID: 17979471
Seems VBScript is the language of choice

http://www.google.com/search?q=vbscript+http+get
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

873 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