XMLHTTPClass does not always retrieves remote URL data - some sites work - some Don't is there a better way to scrape?

Posted on 2004-11-28
Last Modified: 2008-01-09

This works using one remote URL

but not a second one
Will not work with a call to cnn - here's the response.

Not Found The requested URL / was not found on this server.</p>\n<hr />\n<address>Apache Server at Port 80</address>\n</body></html>\n"

IS there a better way?


string postData = "";
string uriString = "";
string strXML ;

XMLHTTPClass xmlHTTP = new XMLHTTPClass();"POST", uriString,false,null,null) ;
xmlHTTP.send(postData) ;

while(xmlHTTP.readyState != 4)
strXML = (string)xmlHTTP.responseText;

Question by:paygo
    LVL 31

    Accepted Solution

    Use this in client side JS

    <body onload="init()">
    <input value="view Yahoo" type="button" onclick="alert(document.getElementById('yahoo').innerHTML)">
    <input value="view ebay"type="button" onclick="alert(document.getElementById('ebay').innerHTML)"> <p>
    function LoadPage(theURL,theID){
       var objSrvHTTP;
              objSrvHTTP = new ActiveXObject("Msxml2.XMLHTTP.4.0");
                   objSrvHTTP = new ActiveXObject("Msxml2.XMLHTTP");
                        objSrvHTTP = new ActiveXObject("Microsoft.XMLHTTP");
                        alert("ok you have Microsoft.XMLHTTP")
                        alert("you need install MSXML 4.0,");
           objSrvHTTP.send ("");

    function init(){
    LVL 31

    Expert Comment

    thanks for the points

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
    This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now