comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: IDL sockets
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: IDL sockets [message #25096] Thu, 17 May 2001 16:56
George Constantinides is currently offline  George Constantinides
Messages: 16
Registered: July 2000
Junior Member
George wrote:

>>> Has any one used the SOCKET function successfully?

>>> I have tried the Craig Markwardt suggestion from an earlier
>>> post without any success.

>>>> socket, unit, 'cow.physics.wisc.edu', 80, /get_lun
>>>> printf, unit, 'GET http://cow.physics.wisc.edu/~craigm/idl/idl.html'
>>>> text = ''
>>>> while eof(unit) EQ 0 do begin
>>>> readf, unit, text
>>>> print, text
>>>> endwhile
>>>> free_lun, unit

Mark wrote:

>>> I didn't bother trying to connect directly to Craig's site because we
are
>>> behind a firewall. Are you? If you are, then the HTTP queries have to be

>>> sent to your proxy server and formulated a bit differently.


George wrote:
>> I tried it on our own web server and I am getting an error response from
>> the server: -ERROR-(501): Gateway function not available,
>> but at least the socket connection has worked.
>> All I have to do now is undertand Error-501 on our type of web server.


Craig wrote:

> It looks like I've gotten myself into a bit of a mess here. It turns
> out that the code I posted in *not* the official way to operate the
> HTTP protocol. I think it works because many web servers can act as
> gateways or redirectors which will essentially execute the protocol
> for you and return the results. My web site server does this, but
> some others do not.

I tried the example *again* on our own WEB server, but this time taking
into account the Gateway issues raised earlier and it worked fine. thanks!
I can now possibly use this to access data on the server without needing
the extra layer imposed by dataminer and ODBC support.

IDL V5.5 support for TCPIP protocols would be nice, but it will compete
directly with ION and DataMiner. I hope RSI don't see this as a problem.



email: GeorgeC@mhl.nsw.gov.au
http://www.mhl.nsw.gov.au
Re: IDL sockets [message #25103 is a reply to message #25096] Thu, 17 May 2001 11:04 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
It looks like I've gotten myself into a bit of a mess here. It turns
out that the code I posted in *not* the official way to operate the
HTTP protocol. I think it works because many web servers can act as
gateways or redirectors which will essentially execute the protocol
for you and return the results. My web site server does this, but
some others do not.

I heard from an RSI employee that a library of object classes had been
constructed which did simple kinds of network protocols like HTTP and
FTP. If this is important to you then you might want to voice your
encouragement to RSI now about including this before IDL 5.5 comes
out.

As for the question by Kelly Dean about getting images, I think the
answer is that the true HTTP protocol permits the return of a
content-type descriptor which tells you an image is coming.
Apparently this doesn't happen with the simple redirector code I
posted.

Craig

George Constantinides <gconstantinides@mhl.nsw.gov.au> writes:
>
> I tried it on our own web server and I am getting an error response from
> the server: -ERROR-(501): Gateway function not available,
> but at least the socket connection has worked.
> All I have to do now is undertand Error-501 on our type of web server.
>
> Mark Hadfield wrote:
... deleted ...
>> I hadn't, but I was sufficiently intrigued to give it a go. I substituted a
>> local WWW site for Craig's and tried it out. It worked! Now all I need to
>> do is load the text into a file, open it in a browser, and I can surf the
>> Web with IDL!
...

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: IDL sockets [message #25106 is a reply to message #25103] Thu, 17 May 2001 09:58 Go to previous message
Kelly Dean is currently offline  Kelly Dean
Messages: 92
Registered: March 1997
Member
Pretty need stuff! I was able to read the idl.htm page. Even text files
from another server.

Just wondering - how would you open and display a JPEG from ...

http://www.emwin.org/rxfiles/G10FDIUS.jpg

To bad GIF support was removed with IDL 5.4.

Kelly Dean
CSU/CIRA

George Constantinides wrote:

> Hi IDLers,
>
> Has any one used the SOCKET function successfully?
>
> I have tried the Craig Markwardt suggestion from an earlier post without
> any success.
>
>> socket, unit, 'cow.physics.wisc.edu', 80, /get_lun
>> printf, unit, 'GET http://cow.physics.wisc.edu/~craigm/idl/idl.html'
>> text = ''
>> while eof(unit) EQ 0 do begin
>> readf, unit, text
>> print, text
>> endwhile
>> free_lun, unit
> --
>
> email: GeorgeC@mhl.nsw.gov.au
> URL http://www.mhl.nsw.gov.au
Re: IDL sockets [message #25112 is a reply to message #25106] Wed, 16 May 2001 23:17 Go to previous message
George Constantinides is currently offline  George Constantinides
Messages: 16
Registered: July 2000
Junior Member
I tried it on our own web server and I am getting an error response from
the server: -ERROR-(501): Gateway function not available,
but at least the socket connection has worked.
All I have to do now is undertand Error-501 on our type of web server.

Mark Hadfield wrote:

> From: "George Constantinides" <gconstantinides@mhl.nsw.gov.au>
>> Has any one used the SOCKET function successfully?
>>
>> I have tried the Craig Markwardt suggestion from an earlier post without
>> any success.
>>
>>> socket, unit, 'cow.physics.wisc.edu', 80, /get_lun
>>> printf, unit, 'GET http://cow.physics.wisc.edu/~craigm/idl/idl.html'
>>> text = ''
>>> while eof(unit) EQ 0 do begin
>>> readf, unit, text
>>> print, text
>>> endwhile
>>> free_lun, unit
>
> I hadn't, but I was sufficiently intrigued to give it a go. I substituted a
> local WWW site for Craig's and tried it out. It worked! Now all I need to
> do is load the text into a file, open it in a browser, and I can surf the
> Web with IDL!
>
> I didn't bother trying to connect directly to Craig's site because we are
> behind a firewall. Are you? If you are, then the HTTP queries have to be
> sent to your proxy server and formulated a bit differently.
>
> ---
> Mark Hadfield
> m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield
> National Institute for Water and Atmospheric Research


email: GeorgeC@mhl.nsw.gov.au
URL http://www.mhl.nsw.gov.au
Re: IDL sockets [message #25113 is a reply to message #25112] Wed, 16 May 2001 21:17 Go to previous message
m.hadfield is currently offline  m.hadfield
Messages: 36
Registered: April 2001
Member
From: "George Constantinides" <gconstantinides@mhl.nsw.gov.au>
> Has any one used the SOCKET function successfully?
>
> I have tried the Craig Markwardt suggestion from an earlier post without
> any success.
>
>> socket, unit, 'cow.physics.wisc.edu', 80, /get_lun
>> printf, unit, 'GET http://cow.physics.wisc.edu/~craigm/idl/idl.html'
>> text = ''
>> while eof(unit) EQ 0 do begin
>> readf, unit, text
>> print, text
>> endwhile
>> free_lun, unit

I hadn't, but I was sufficiently intrigued to give it a go. I substituted a
local WWW site for Craig's and tried it out. It worked! Now all I need to
do is load the text into a file, open it in a browser, and I can surf the
Web with IDL!

I didn't bother trying to connect directly to Craig's site because we are
behind a firewall. Are you? If you are, then the HTTP queries have to be
sent to your proxy server and formulated a bit differently.

---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research


--
Posted from clam.niwa.cri.nz [202.36.29.1]
via Mailgate.ORG Server - http://www.Mailgate.ORG
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: re:call_external with V c++
Next Topic: shade

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:49:54 PDT 2025

Total time taken to generate the page: 0.00698 seconds