Re: Queries of .asp pages with IDL SOCKET command [message #42485 is a reply to message #42468] |
Tue, 08 February 2005 16:30  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
Wayne Landsman <landsman@sampa.gsfc.nasa.gov> writes:
>
> However, although active server pages (.asp) have a very similar
> appearance, a query that I successively type into the Web page, e.g.
>
> http://cas.sdss.org/astro/en/tools/search/x_radial.asp?ra=19 5.0&dec=2.5&radius=3&topnum=10&format=html
>
> will give an error message it I send the same string to webget.pro. I
> am hoping that I just need to add some extra formatting command to
> make this work.
>
> Thanks, --Wayne Landsman
>
Wayne, I was able to download this page with the Unix command line
tool 'curl' with no problem. I'm including the HTTP protocol headers
below in case they help. It looks like there is a cookie set, but I
don't know if that's your problem.
[10]> curl --verbose ' http://cas.sdss.org/astro/en/tools/search/x_radial.asp?ra=19 5.0&dec=2.5&radius=3&topnum=10&format=html'
* About to connect() to cas.sdss.org port 80
* Connected to skyserver2.fnal.gov (131.225.7.125) port 80
> GET /astro/en/tools/search/x_radial.asp?ra=195.0&dec=2.5& ;radius=3&topnum=10&format=html HTTP/1.1
User-Agent: curl/7.11.1 (i386-redhat-linux-gnu) libcurl/7.11.1 OpenSSL/0.9.7a ipv6 zlib/1.2.1.2
Host: cas.sdss.org
Pragma: no-cache
Accept: */*
< HTTP/1.1 200 OK
< Connection: close
< Date: Wed, 09 Feb 2005 00:23:50 GMT
< Server: Microsoft-IIS/6.0
< X-Powered-By: ASP.NET
< Content-Type: text/HTML
< Set-Cookie: ASPSESSIONIDQCDQRBTA=GEPBOCIAIJCPGNBFMIJCDOKD; path=/
< Cache-control: private
<html><head>
<title>SDSS Query Results</title>
</head><body bgcolor=white>
...
Craig
For reference, here is the output of the Vizier query:
[20]> curl --verbose ' http://vizier.u-strasbg.fr/cgi-bin/asu-tsv/?-source=gsc2.2&a mp;-c=m33&-c.rm=10'
* About to connect() to vizier.u-strasbg.fr port 80
* Connected to vizir.u-strasbg.fr (130.79.128.13) port 80
> GET /cgi-bin/asu-tsv/?-source=gsc2.2&-c=m33&-c.rm=10 HTTP/1.1
User-Agent: curl/7.11.1 (i386-redhat-linux-gnu) libcurl/7.11.1 OpenSSL/0.9.7a ipv6 zlib/1.2.1.2
Host: vizier.u-strasbg.fr
Pragma: no-cache
Accept: */*
< HTTP/1.1 200 OK
< Date: Wed, 09 Feb 2005 00:28:23 GMT
< Server: Apache/1.3.27 (Unix)
< Content-Disposition: inline; filename="asu.tsv"
< Transfer-Encoding: chunked
< Content-Type: text/tab-separated-values
#
# VizieR Astronomical Server: http://vizier.u-strasbg.fr 20 ...
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|