no need to write read a file.

Just use the CFHTTP.FileContent

prolly the reason listlast doesn't work is the new lines are 2 chars CR  
& LF

1) rereplace all chr(13) with nothing
2) specify chr(10) as a delimiter in the listlast (last paraneter)

HTH

Dick

"The nice thing about standards is that there are so many of them to  
choose from."
- Andrew S. Tanenbaum -

On Jul 22, 2004, at 11:22 PM, dave wrote:

> i have gotten it written to a file and read and here is the output  
> using listLast
>  not really giving me the last, maybe cause im writing tot a txt  
> andnot a csv?
>
>  http://www.rockymtanglers.com/flows/try.cfm
>
>  code
>
>  <!--- retrieve info from USGS website --->
>  <cfhttp  
> url=""
> dd_cd=01&dd_cd=18&format=rdb&period=1&site_no=09085000&01_00060 "
>  method="get">
>  </cfhttp>
>
>  <!--- place contents into a formated variable --->
>  <cfset page = #HTMLEditFormat(cfhttp.filecontent)#>
>
>  <!--- write variable to text file --->
>  <cffile action=""> >  addnewline="no"
>  file="c:/websites/sites/flows/flowData.txt"
>  output="#page#">
>
>  <!--- read from just written text file --->
>  <cffile action=""> >  file="c:/websites/sites/flows/flowData.txt"
>  variable="data">
>
>
>
>  <!--- <cfdump var="#data#"> --->
>
>  <!--- get last line from test file --->
>  <cfset line = listLast(data, chr(13))>
>
>
>
>  <cfoutput>
>  #Line#
>  </cfoutput>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to