/t5/coldfusion-discussions/url-validation/m-p/977866#M89193May 13, 2008
May 13, 2008
Copy link to clipboard
Copied
You can use CFHTTP, and then check to see if there is any
amount of size to the returned file. That does NOT guarantee that
there is any useful content or anything like that, of course.
Keep in mind that even a bad URL will return SOME content
such as "File Not Found" or something like that. For that reason,
you dont want to base your decisions on whether or not the returned
file size is greater than zero.
/t5/coldfusion-discussions/url-validation/m-p/977867#M89194May 13, 2008
May 13, 2008
Copy link to clipboard
Copied
tclaremont wrote:
> You can use CFHTTP, and then check to see if there is
any amount of size to the
> returned file. That does NOT guarantee that there is any
useful content or
> anything like that, of course.
>
> Keep in mind that even a bad URL will return SOME
content such as "File Not
> Found" or something like that. For that reason, you dont
want to base your
> decisions on whether or not the returned file size is
greater than zero.
>
You can also use the status property of the cfhttp results to
see if you
get an OK 200 status or some other status returned by the
remote server.