Jump to content

Searching A String


Andy252

Recommended Posts

I want to add a URL banning feature to my website

Initially I was just going to ban the full url as entered by the users, however, in some cases the url may change by using ?page=Bla, and therefore would not be identified as a banned url. Instead I need to be able to search the url entered for entries in a mysql database. What  function do I need to be using the search the string for banned urls?
Link to comment
https://forums.phpfreaks.com/topic/34644-searching-a-string/
Share on other sites

OK, Actually I need two seperate script but I don't want to jump the gun....


Users submit URLs via a form on my site, which is then put into MySQL.

The first problem is not all the URLs are following the rules are therefore I want to add a banning features. I can't simply ban the domain because for the likes of tripod / geocities it will ban everyone. I also can't ban the full url because urls because users will bypass the banning feature by removing the "www." or adding  "?page=1".

Instead I need to be able to ban *tripod.com/directory*, or something like *domain.com/~user/*

Once I have this in place I need to add a feature that will test the URLs are correct because after looking at my database there are a lot of entries which look like this... http://kljfhigufwuergfosuhailu, or http://0000.

Thanks for your help guy !

Link to comment
https://forums.phpfreaks.com/topic/34644-searching-a-string/#findComment-163532
Share on other sites

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.