<cfhttp url= "http://www.weather.com/weather/us/zips/91350.html" method="get" 
resolveurl="true">
</cfhttp>

<cfset content = #cfhttp.filecontent#>

<cfset pos = (find("Temp:", "#content#", "1")- 1)>
<CFSET content = removechars("#content#","1","#pos#")>
<cfset pos = (find("&deg;F", "#content#", "1")+ 6)>
<CFSET content = removechars("#content#","#pos#","#len(content)#")>


<cfset tag = "<">
<cfset taglen = len(tag)>
<cfset start = 1>

<cfloop condition="start gt 0">
        <cfset start = FindNoCase(tag, content)>
        <cfif start gt 0>
                <cfset end = FindNoCase(">", content, start)>
                <cfset content = RemoveChars(content, start, end-start+1)>
        </cfif>
</cfloop> 


<cfoutput>

#content#
</cfoutput>


---------- Original Message ----------------------------------
From: "Computer Simplistics Suppoer" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Mon, 8 May 2000 20:41:27 -0700

>Well, I am having a bear of a time with this. All I simply want to do is
grab a little weather info off their page, but can't find a way to do it. I
have looked at the previous custom tags in the gallery, but none seem to do
what I want. The major problem is that the info on their site is not
separated by any special character, so I can't set the start and end points
for the grab from the CFHTTP very easily. Anyone see an easy way to grab say
just the temp off this page?

http://www.weather.com/weather/us/zips/91350.html

I just want whatever digits which are between the phrase "Temp:" and the
degree sign. The problem is that there is a whole crapload of code in the
source between those two strings. Any help?

Scott Berry
--
Computer Simplistics Support
"Simple Solutions for a Complex World"
http://www.c-s.net
661-296-4315


----- Original Message -----
From: "Leong Yew" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 08, 2000 8:15 PM
Subject: RE: CFHTTP


> I believe it's the file in its entirety. If you want to get rid of the
stuff
> nested in the <head></head> tags there's a custom tag in the Allaire
gallery
> that parses this for you.
>
> -----Original Message-----
> From: Computer Simplistics Suppoer [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 09, 2000 12:16 PM
> To: [EMAIL PROTECTED]
> Subject: CFHTTP
>
>
> I am using CFHTTP to write a little grabber to get info from the
weather.com
> site. Does CFHTTP read the source or viewable text? In other words, if I
> refrence the CFHTTP.FileContent variable am I working with only the
viewable
> text from that page or the actual source code?
>
> Scott Berry
> --
> Computer Simplistics Support
> "Simple Solutions for a Complex World"
> http://www.c-s.net
> 661-296-4315
>
>
>
>
> --------------------------------------------------------------------------
--
> --
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
> the body.
>
> --------------------------------------------------------------------------
----
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>



------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to