[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register 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
?
883 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 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

It's sometimes a bit tricky to use date functions in Oracle BPEL. I'll explain quickly how you can add N days to the current date. In a BPEL process this can be useful, and you can adapt it to fit your needs. First of all, let's see how to add 1 …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

656 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