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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFHTTP Content Retreval From A News Provider!

Status
Not open for further replies.

bluesauceuk

Programmer
Jan 1, 2001
73
GB
Hiya,

I need help in getting the info into my own style sheet and then formatting it I am not sure if its WDDX or not - I'm new to this.

This is what I have...

Code:
<cfhttp method=&quot;GET&quot; url=&quot;[URL unfurl="true"]http://www.guardian.co.uk/Distribution/Artifact_Trail_Block/0,5184,179821-0-3,00.html&quot;></cfhttp>[/URL]

<cfoutput>#cfhttp.filecontent#</CFOUTPUT>


... This works fine - but I want to be able to add my style sheet for the title etc.

I do have a moreover tag... but I want to use the Guradian which is a UK newspaper. (Guradian Unlimited)

All I need to do is load it in and then push it back out in a CFOUTPUT...

How the heck can I do it...

I need help quick... BTW you are licenced to harvest content from this website.

Cheers,



Mark ;-)
 
Hey Mark,

I you can use the replace function to substitute your html code for theirs like this.

<cfset myCode=&quot;<ccss code here....></head>&quot;>

<cfoutput>
#replace(cfhttp.fileContnet,&quot;</head>&quot;,myCode)#
</cfoutput>

Just target some code in the appropriate place that is unlikely to change such as a </head> tag or even their own css file if they use one. You can then use replace to swap out their code for yours.

Hope this helps,
GJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top