Jump to content

can i prevent internet bots by php?


champoi

Recommended Posts

i was pretty much assured when i was using random names for my file names in my ftp, but i was shocked when i found out that there were bots capable of crawling in my site and know what and where are my files. how can i stop the bots or any kind of program from stopping this, i think there might be php scripts or any idea on php that can help me. i think that's how password protect programs works. but i may be wrong, please correct me or give an idea.  ???

Link to comment
https://forums.phpfreaks.com/topic/139145-can-i-prevent-internet-bots-by-php/
Share on other sites

Hmm..what bots are finding your files? The only way a file could be found and (I'm assuming you mean bots like Googlebot) indexed were if they were linked to somewhere.

 

hmmm, what im saying are not specifically bots, but programs that can crawl or maybe know the directories of my files. Ive had some experience on php but i havent really got to those bots. So i want to restrict the files and not allow unauthorized people to see those files. This includes .txt or .doc files.

I would recommend a robots.txt file that's the best I can think of.

 

User-agent: *
Disallow: /foo/ (Site relative path)

 

thnx darkangel, but i think that's only some part of what i want to know. If possible, by php, to restrict those files. I dont think those password protect programs over the net are really reliable.  :D

if you wanna password and you have apache you can use a htaccess file coupled with a htpasswd file. its fairly reliable. i mean just for simple stuff. I wouldn't recommend it for some really sensitive data.

 

nice, thnx :D im studying now on how to mix it with php, thnx very much :D

Regardless of if they can see the filename or not, they can't see the code.

 

Make sure you have directory indexes turned off in your webhost.

Make sure each page you want to be secured is secured with validation code.

If you really want to hide them, put them below your webroot folder.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.