Hi Carlos,
Are you sure you know how that webpage functions? I got into work early so
tried it out, the page does not just accept a URL with GET variables. At
some point it's setting up a cookie that contains the time variable and I
believe unless that is at least set it will redirect you to the page,
removing all get headers.
When I tried it the HTTPSocket did have valid content. It said that it
doesn't understand the headers sent by our "browser" but that's because we
have a raw HTTPSocket, so I'm guessing that some formating is going to
need to be done on that URL that internet explorer is doing automatically
(Asuming you're on Windows).
Hope that helps.
Deane
Carlos,
Where I'm most in need of an explanatory example, the Language Reference
fails to provide one. For example, this code works:
Temp2 = HTTPSocket1.Get(Temp1, 30)
but the docs do not seem to indicate that you can do that. All they
mention is something like this:
HTTPSocket1.Get(Temp1, 30)
(How did I know that I HTTPSocket.Get could be used as a Function in
addition to being used as a Method? Only because someone on this
mailing list mentioned it.)
HTTPSocket.Get and HTTPSocket.GetHeaders sound like they might be
parallel, but I found that the following does NOT work:
Temp2 = HTTPSocket1.Get(Temp1, 30)
I get the error message that RB is expecting a string rather than an
InternetHeader, but I know nothing about the workings of an
InternetHeader.
I think that you're right that the URL is redirecting to a different
page, but without more guidance I can't figure out how to use
PageReceived, HTTPStatus, etc. to get what I need to know (and if I did
get it, I'm not sure what to do with it.)
I think I ran into something like this when I had a directory rather
than a file for a URL (or was it when I put and when I didn't put a
slash after a directory name?), but that problem was easily fixed by
modifying the URL. I can't do that here. Any more details on what I
can and should do?
Barry Traver
______________________________
Carlos M wrote:
On Jun 18, 2006 2:07 PM, Barry Traver wrote:
I can't seem to get HTTPSocket to give me what HTMLViewer
(correctly) gives me.
<snip>
I seem to get the HTML for a different page altogether.
(It's certainly not what I get if I go to that URL and "View
Source" with a regular Web browser.)
Anyone have any idea what's happening here? How can I get
HTTPSocket to show me the source code (i.e., put the source code
into a string) for that URL?
I'm probably doing something stupid, but I can't figure out what.
I presume that URL is redirecting to a different page. On the
HTTPSocket check (on PageReceived) the httpStatus code to see if you
get a 302 or 301 redirect code - if yes, then check the headers for
the new URL location.
Carlos
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>