Link to home
Start Free TrialLog in
Avatar of hulken
hulken

asked on

File Exist Over WWW

is there any way to connect to a www server and se if a
file exist on that server?
Avatar of Baksa
Baksa

Yes, with IIS dll. Put following code in WebAction OnAction event :

FileExists(Request.PathTranslated+'\file.fle')

This will test if file exists in root server directory.

If I understood correctly what you wont.
Avatar of hulken

ASKER

Where do I get IIS dll?
No, no, you must MAKE IIS (internet information server) or ISAPI dll (two names for same thing), to do thath with Delphi choose NEW from FILE menu and then select WebServer application, then delphi will ask you for type of your app, choose ISAPI/NSAPI application.

Hit the www.google.com with this search "ISAPI delphi tutorial" and you will get a really lot of tutorials, help and examples.
Avatar of hulken

ASKER

Does this mean that I need to have this dll running on the web server?

That is not what I need if so.
Avatar of hulken

ASKER

I use a TWebBrowser to Watch some files that are on a
web server.
(say http://server.com/pics/)
so I need to know if the picture a.gif exsist befor I makes it possible to open it in TWebBrowser.
ASKER CERTIFIED SOLUTION
Avatar of Baksa
Baksa

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hulken

ASKER

Thnks.. I was not able to use the OnSucses thing because They have configured the server to use a own page for page not found.
But in my case when I always want to check if a gif image exist I can use TNMhttp and check the header for Content type image/gif