• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 196
  • Last Modified:

File Exist Over WWW

is there any way to connect to a www server and se if a
file exist on that server?
0
hulken
Asked:
hulken
  • 4
  • 3
1 Solution
 
BaksaCommented:
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.
0
 
hulkenAuthor Commented:
Where do I get IIS dll?
0
 
BaksaCommented:
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.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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

That is not what I need if so.
0
 
hulkenAuthor Commented:
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.
0
 
BaksaCommented:
You can use TNMHttp component, on FastNet tab, it has GET method which you can use to retrieve file and OnSuccess or OnFaulire events. I didn't work much with FastNet components so maybe is in there some better component for your purpose.


0
 
hulkenAuthor Commented:
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
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now