Re: Posting html form data with idlNetURL? [message #58972] |
Thu, 28 February 2008 13:34  |
Kenneth Bowman
Messages: 86 Registered: November 2006
|
Member |
|
|
In article <014ede89-abf8-4a39-93e8-2029f3b0bc31@34g2000hsz.googlegroups.com>,
skapali@gmail.com wrote:
> Hi,
>
> I would like to use idlNetURL object to post a web form, setting the
> fields in the form with appropriate values. If anyone has examples of
> how to this, I'd appreciate it very much!
Can't help with this, but we were trying to use IDLnetURL to ftp a simple
PNG file. It works fine to one ftp server, put crashes IDL (seg fault
or bus error, depending on hardware) to a different ftp server. Command
line ftp works fine to both servers.
We might be doing something wrong, but we still shouldn't be able to crash
IDL. :-)
We have filed a bug report (and switched to SPAWNing a curl process).
Cheers, Ken Bowman
|
|
|
Re: Posting html form data with idlNetURL? [message #58983 is a reply to message #58972] |
Fri, 29 February 2008 11:19  |
skapali
Messages: 4 Registered: February 2008
|
Junior Member |
|
|
On Feb 28, 3:45 pm, skap...@gmail.com wrote:
> Hi,
>
> I would like to use idlNetURL object to post a web form, setting the
> fields in the form with appropriate values. If anyone has examples of
> how to this, I'd appreciate it very much!
>
> Thanks
>
> Sudha
After getting educated about the http client protocol, I figured it
out. Basically, you find the url that to which the form will be
submitted from the 'action' field of the form, and append the field
name and value pairs to the end of that url. Here's a sample if
someone's interested:
pro websample
ourl = OBJ_NEW('IDLnetURL')
content1 = ourl->get(url='http://www.google.com', /string_array);
print, 'Contents of google.com:'
print
print, content1
print
content2 = ourl->get(url='http://www.google.com/search?q=IdlnetURL', /
string_array)
print, 'Contents of searching google for idlneturl:'
print
print, content2
OBJ_DESTROY, ourl
end
|
|
|