Can I test to see if a remote url file exists?
I need to check to see if an mp3 file exists on a remote server. Can someone help me with this code?
thanks,
Richie
I need to check to see if an mp3 file exists on a remote server. Can someone help me with this code?
thanks,
Richie
It is not going to return a yes or no. It is going to return a structure. YOu then examin that structure to determine if it was a yes or no.
As BKBK showed
<cfhttp method="head" url="http://www.myurl.com/mymp3.mp3">
...
<cfdump var="#cfhttp#">
You would then be looking for a "200 OK" status. 200 OK is the HTTP status that the URL was found and returned what was requested.
<cfhttp...> documentation.
http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_g-h_09.html
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.