Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pulling information from one page to another 1

Status
Not open for further replies.

17washington

Programmer
Aug 2, 2001
1
0
0
US
Can some one explain to me this code. I know what it does but I can't follow it.

<CFHTTP URL=&quot; METHOD=&quot;GET&quot;>
</CFHTTP>
<CFSET Count=FindNoCase(&quot;</font>&quot;,CFHTTP.FILECONTENT)+7>
<CFSET Count2=FindNoCase(&quot;</body>&quot;,CFHTTP.FILECONTENT)>
<CFSET COUNT2 = count2-count>
<CFSET Page=Mid(CFHTTP.FILECONTENT, count, COUNT2)>

<CFOUTPUT>
#Page#
</CFOUTPUT>
 
The first cfset <cfset count=
Looks for the first instance of the tag </font> in the html of the file you got. Then it returns the position value of that tag plus 7. So it finds the position directly after the first </font> tag.
The second cfset <cfset count2=
is the same, but it looks for the </body> tag.
And finally the <cfset page=
returns the number of characters between the end of the </font> tag and the </body> tag.

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top