On Mon, 27 May 2002 10:28:11 -0400, in cf-talk you wrote:
>I realized that CFHTTP can't open a cookied session with a site which really
>sucks. Can you do it with the Lewis Seller Com?
Well,... yes. You can pretty much do anything tcp related with the
COM, BUT the thing to remember is it's a generic TCP interface. That
is, you have to have read the RFC's and understand the language of
HTTP1.1, first.
Um. The following tcp code will grab the "/" index page from
Macromedia.com in HTTP/1.1 mode.
<cfset c=obj.Open("www.macromedia.com","80")>
<CFIF c IS "1">
<cfset obj.timeout=5.000>
<cfset obj.SendRN("GET / HTTP/1.1")>
<cfset obj.SendRN("Host: www.macromedia.com")>
<cfset obj.SendRN("")>
<cfset page=obj.Recv()>
<cfoutput>#HTMLCodeFormat(page)#</cfoutput>
<cfset obj.Close()>
</CFIF>
If you want to send a cookie as well you need to add a...
<cfset obj.SendRN("Set-Cookie: mycookie=hasfleas; path=/")>
in there.
If the server set the cookie then you get back a line (or lines)
starting with "Cookie:" with the name/values of the cookies.
You basically have to do all the parsing your self and learn to talk
HTTP protocol. But yes, you can technically do anything the server
supports. (Which the exclusion of SSL/TLS and S/MIME -- Version 3.x...
if I ever have time to complete it, will have full cryptographic
support, but the current release version don't support it.)
--min
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists