1. exists of file on www-server?

Hi everyone,

I would like to check the existence of certain files on a web server by
an EU function, i.e., the function could be like:

 pageexist("http://www.given_server.net/Sub1/page.htm") .

It should return 1 if the page exists, and 0 else.
Any recommendation or help is appreciated.

Thanks, and have a nice day, Rolf

new topic     » topic index » view message » categorize

2. Re: exists of file on www-server?

On 8 Apr 2002, at 16:20, rolf.schroeder at desy.de wrote:

> 
> Hi everyone,
> 
> I would like to check the existence of certain files on a web server by
> an EU function, i.e., the function could be like:
> 
>  pageexist("http://www.given_server.net/Sub1/page.htm") .
> 
> It should return 1 if the page exists, and 0 else.
> Any recommendation or help is appreciated.

Rather like looking for a file on your harddrive, try to open it, if you get a
404
notfound or 302 redirect, it's not there.

Kat

new topic     » goto parent     » topic index » view message » categorize

3. Re: exists of file on www-server?

This might be difficult as some webservers don't return 404 when
page not found, but create a HTML (with graphics and ads)
saying it to you...

    Martin

----- Original Message ----- 
From: <rolf.schroeder at desy.de>
To: "EUforum" <EUforum at topica.com>
Subject: exists of file on www-server?


> 
> Hi everyone,
> 
> I would like to check the existence of certain files on a web server by
> an EU function, i.e., the function could be like:
> 
>  pageexist("http://www.given_server.net/Sub1/page.htm") .
> 
> It should return 1 if the page exists, and 0 else.
> Any recommendation or help is appreciated.
> 
> Thanks, and have a nice day, Rolf
> 
> 
> 
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: exists of file on www-server?

> > Hi everyone,
> > 
> > I would like to check the existence of certain files on a web server by
> > an EU function, i.e., the function could be like:
> > 
> >  pageexist("http://www.given_server.net/Sub1/page.htm") .
> > 
> > It should return 1 if the page exists, and 0 else.
> > Any recommendation or help is appreciated.
> 
> Rather like looking for a file on your harddrive, try to open it, if you get a
> 404
> notfound or 302 redirect, it's not there.
> 
> Kat

I may be wrong but Ive setup a server recently and you would need permission
to do what you want. If a host is using an SSI filter or some security mechanism
then it will be almost impossible to find anything that exist within the realm
of a
particular site exept those file specifically specified "allowed" for viewing.

Sure some hacker tricks might work but most SSI will keep novice hackers a bay.

Euman

new topic     » goto parent     » topic index » view message » categorize

5. Re: exists of file on www-server?

euman at bellsouth.net wrote:
> 
> I may be wrong but Ive setup a server recently and you would need permission
> to do what you want. If a host is using an SSI filter or some security
> mechanism
> then it will be almost impossible to find anything that exist within the realm
> of a
> particular site exept those file specifically specified "allowed" for viewing.
> 

Hi Euman,

I want to find only those files which are 'visible' or 'allowed' for
viewing via a web browser. A few examples:

http://desyntwww.desy.de/Sub1/page.htm            <-- not existing
http://desyntwww.desy.de/mpl/english/index_e.htm  <-- allowed
http://desyntwww.desy.de/~singerw/index.html	  <-- forbidden

Instead of writing each page in question into the location bar of the
web browser, I would rather like to check it by running an Euphoria
program to find all allowed pages on the web server (many pages!). Be
aware there are pages allowed to view by the browser but not via the
file system. I'm not familiar with the kind of functions one might find
in a DLL on the Win32 system. That's what I'm searching and the EUPHORIA
community asking for.

Have a nice day, Rolf

new topic     » goto parent     » topic index » view message » categorize

6. Re: exists of file on www-server?

On 8 Apr 2002, at 21:59, Rolf Schröder wrote:

> 
> euman at bellsouth.net wrote:
> > 
> > I may be wrong but Ive setup a server recently and you would need permission
> > to do what you want. If a host is using an SSI filter or some security
> > mechanism then it will be almost impossible to find anything that exist
> > within
> > the realm of a particular site exept those file specifically specified
> > "allowed" for viewing.
> > 
> 
> Hi Euman,
> 
> I want to find only those files which are 'visible' or 'allowed' for
> viewing via a web browser. A few examples:
> 
> http://desyntwww.desy.de/Sub1/page.htm            <-- not existing
> http://desyntwww.desy.de/mpl/english/index_e.htm  <-- allowed
> http://desyntwww.desy.de/~singerw/index.html	  <-- forbidden
> 
> Instead of writing each page in question into the location bar of the
> web browser, I would rather like to check it by running an Euphoria
> program to find all allowed pages on the web server (many pages!). Be
> aware there are pages allowed to view by the browser but not via the
> file system. I'm not familiar with the kind of functions one might find
> in a DLL on the Win32 system. That's what I'm searching and the EUPHORIA
> community asking for.

Ok, get webshepard or Thomas Parslow's async http, make a list of the files, 
and loop thru till the end of list. If you know what the not-found result is
(look
for a known bad url first, like "rgysr/wertyw/wrw/wrtyw/eft", then you know 
what the not-found ones will return), and if you get a not-found, it's not
there,
or it is there.

Kat

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu