Wrox Programmer Forums
|
Classic ASP XML Using ASP 3 and XML. See also the XML category for more XML discussions not relating to ASP. NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 3rd, 2004, 10:28 PM
Authorized User
 
Join Date: Apr 2004
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default http status code

Hi! I'm trying to get the status code of a url. I tried using this code..

<%
  Dim xml, strData, url
  url = "http://www.google.com"

  Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
  xml.Open "GET", url, false ' the True specifies an asynchronous request
  Call xml.Send()

  response.write xml.status

%>

But then, I only get a blank screen. When I viewed the source, here's the output:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

How come the status isn't displayed? What else should I do?

Thanks!!!





Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP Status 404 rivcam JSP Basics 7 June 3rd, 2008 09:32 PM
Http Status 500 ashutosh9910 Apache Tomcat 0 December 22nd, 2004 03:04 AM
how to get http status code lian_a Classic ASP Basics 6 May 4th, 2004 02:53 AM
HTTP Status 405 - HTTP method GET .... nsakic Servlets 1 January 25th, 2004 04:50 PM
HTTP status 404 brianjs JSP Basics 2 October 26th, 2003 03:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.