Hi all,
I am working on retrieving news content from the 'Guardian-Unlimited' site.
If the URL doesnt work through technical problems,i want to be able to abort the retrieval and display previous news already stored in a DB instead.
Can CFHTTP 'test' the given URL prior to executing the retrieval??
My code is as follows:
<!--deletes previously stored news-->
<cfquery name="delete_all_records" datasource="guardian" dbtype="ODBC">
DELETE FROM news
</cfquery>
<!--Retrieval-->
<cfhttp method="get"
url=" path="C:\My Documents\Alexis\Guardian\" file="guardian.txt">
<CFFILE ACTION="Read" FILE="C:\My Documents\Alexis\Guardian\guardian.txt" VARIABLE="news">
<CFOUTPUT>
#news#
</CFOUTPUT>
thanks in advance for any help
I am working on retrieving news content from the 'Guardian-Unlimited' site.
If the URL doesnt work through technical problems,i want to be able to abort the retrieval and display previous news already stored in a DB instead.
Can CFHTTP 'test' the given URL prior to executing the retrieval??
My code is as follows:
<!--deletes previously stored news-->
<cfquery name="delete_all_records" datasource="guardian" dbtype="ODBC">
DELETE FROM news
</cfquery>
<!--Retrieval-->
<cfhttp method="get"
url=" path="C:\My Documents\Alexis\Guardian\" file="guardian.txt">
<CFFILE ACTION="Read" FILE="C:\My Documents\Alexis\Guardian\guardian.txt" VARIABLE="news">
<CFOUTPUT>
#news#
</CFOUTPUT>
thanks in advance for any help