>I tried this:
>
>on mouseUp
> if exists (url
>"http://www.gurudeva.dynip.com/~htoday/today/Archives/Past/2000/March/March_
>21_2000/video.mov") then
> put "true" into msg
> else
> put "false" into msg
> end if
>end mouseUp
>
>but the result was false even though the file "video.mov" did in fact exist
>on the web site at the indicated directory. What is wrong with my syntax? I
>would often need to check to see if a given web document is actually
>present, and then give instructions to the user accordingly.
>
>mmm. . .maybe as Scott told Jacqueline earlier, one should really cut his
>teeth on HTTP protocol if one wants to play this game. . . can anyone point
>me to docs that we can start studying?
Here's a way to do it:
on mouseUp
put hostnametoaddress ("http://www.gurudeva.dynip.com") into X
open socket X
write "/~htoday/today/Archives/Past/2000/March/March_21_2000/video.mov" \
& crlf & crlf to socket temp
read from socket temp for 1 line
put it
close socket temp
end mouseUp
If the file exists you get "HTTP/1.0 200 OK" else you get a 404 error.
There should be a simpler way but I'm out of it right now.
This can also help you understand how sockets might work.
Also get from ftp.metacard.com/MetaCard a file named "ftp-q_b12.mc" which should help
with your ftp question and hopefully more.
>
>Hinduism Today
>
>Sivakatirswami
>Editor's Assistant/Production Manager
>www.HinduismToday.com
>[EMAIL PROTECTED]
>
>
>Archives: http://www.mail-archive.com/metacard%40lists.best.com/
>Info: http://www.xworlds.com/metacard/mailinglist.htm
>Please send bug reports to <[EMAIL PROTECTED]>, not this list.
>
>
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.