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!

CFHTTP within a looped CFHTTP?

Status
Not open for further replies.

196509

IS-IT--Management
Sep 4, 2001
7
0
0
US
Hi all,
I have a looped CFHTTP that outputs content of URLs one after another as follows;
<cfloop query=&quot;getPages&quot;>
<CFHTTP method=&quot;Get&quot; url=&quot; resolveurl=&quot;yes&quot;>
<cfoutput>#CFHTTP.FileContent#</cfoutput>
<br class=&quot;pagebreak&quot;>
</cfloop>

Now some of the pages output by this CFHTTP contain URLs on their own(and these URLs are not pulled from database). I like to CFHTTP these URLs as well to output their content as well. So I guess I need to code
1. that sees whether a page contains some URLs.
2. if it does, put them in an array, a loop and use second CFHTTP to output them one by one.
3. combine the second CFHTTP with the first CFHTTP that I already have.

Do you have better idea to achieve this or coding idea to for these three steps?

Thanks much.

-CFJewel.
 
Let me see if I understand this system -- you want to parse an html doc for anchors, grab the associated url's and then cfhttp that content... (ad nasueum, perhaps)?

What's the purpose of this? It sounds like you're trying to build a crawler, but cfhttp used like that would crash your server. I'm sure you can do it with a regular expression, but why -- or not even why but what's the actual desired effect of the recursive cfhttp? __________________________________
&quot;This is our Stretchy-Relativistic-Ruler -- it allows us to read a moving measurement from a fixed point accurately during space contraction... How fast can you run down the hall?&quot; -- Overheard Physics Professor at the University of Oregon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top