I think the basic logic would be to first find the location in the string of each break point between the sections, and then use mid() and/or left() to get the sections of the page.
So, to get the header, you might do: <cfset l_EndHeaderPosition = find("<!--ENDHEADERCODE-->", l_CfhttpVarName )> <cfset l_HeaderContents = Left(l_CfhttpVarName, l_EndHeaderPosition)> >>> <[EMAIL PROTECTED]> 01/30/02 09:12AM >>> I need help with taking one page apart using CFHTTP. Actually I need to take the page on 3 parts, like header, middle, and footer, based on comments. Is somewone had to do similar thing? Could anybody give asample of it? Thanks a lot. Max. ----- Original Message ----- From: "Paul Giesenhagen" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, January 30, 2002 1:11 AM Subject: Re: CFHTTP > This information will pull weather data from accuweather.com for Dryden > Ontario (Canada) > > <!-- First I set the Variable that is at the begining of where I want to > start ---> > <CFSET variables.start = "<!-- 5 DAY HTML START -->"> > <!-- Then I set the variable to get where it all ends (I want all the > information between these two places ---> > <CFSET variables.end = "<!-- 5 DAY HTML END -->"> > <!--- now I go ahead and cfhttp for the url I am wanting information on ---> > <CFHTTP > URL="http://www.accuweather.com/adcbin/intlocal_index?wxcity2=DRYDEN&wx count > ry=CA;ON&metric=0" RESOLVEUL="true" throwonerror="true"></cfhttp> > > <!-- All information retrieved from CFHTTP is put into the variable > cfhttp.filecontent we call it variables.original_content ---> > <CFSET variables.orginal_content = "#cfhttp.filecontent#"> > > <!--- Now I want to Find the start place of the content (this will get us a > number)---> > <CFSET variables.edit_content = RefindNoCase('#variables.start#', > variables.orginal_content)> > <!-- Next do the same for the ENDING of the content you are looking for ---> > <CFSET variables.final_edit_content = RefindNoCase('#variables.end#', > variables.orginal_content, variables.edit_content)> > <!--- now just parse out the information in between and put it into > variables.final_content ---> > <CFSET variables.final_content = mid(variables.orginal_content, > variables.edit_content, > variables.final_edit_content-198-variables.edit_content)> > > <!--- Walla, you have weather for dryden ---> > <CFOUTPUT> > #variables.final_content# > </CFOUTPUT> > > Hope this helps... take a look at the orginial url and it's content and it > will hopefully make more sense... basically the whole html file is > retrieved, and you just look for a starting point and an ending point and > strip out everything outside of that. > > Good Luck > > Paul Giesenhagen > QuillDesign > http://www.quilldesign.com > SiteDirector - Commerce Builder > > > > I recently made a simple page using CFHTTP that pulled a webpage and > > displayed it. What I heard could be done with CFHTTP was you could pull > > a page and have CF look at the source and only display certain parts > > that are between a start and end point that you specify. Could someone > > give me an example of this? > > > > Thanks, > > Jim Vosika > > > > > > > ______________________________________________________________________ Get Your Own Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists