• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Automatic Hotel URL filter

Joined
Feb 5, 2010
Messages
415
Reaction score
244
Hello,

I made this script with the help of simpleHTML (class) for and I wanted to share it with everyone.

What is this script about?

Basically, the script gets the content from and parses it, looking for all images and checking if those images contain an 'url' element ( This element could be called a 'custom element' I made up so the script could fetch the URL of each hotel ).

So, you run the code from a PHP file and it'll automatically add each URL of the topsite's top 25 hotels to your wordfilter table.

Originally, I made it to work for RevCMS but it should work with uberCMS along with PhoenixDB and uberDB.

Script:

It is tested, nonetheless I made a few edits before release so if you find any errors report them and I'll fix them ASAP.

Also, remember to edit the $hotel variable with your hotel's URL.


Enjoy,
 
Last edited:
Experienced Elementalist
Joined
Oct 17, 2008
Messages
293
Reaction score
64
Didn't block anything just added Word '' Replacement 'I\'m a dirty advertiser..' Strict '1'
 
Experienced Elementalist
Joined
Jul 14, 2011
Messages
258
Reaction score
43
Looks nice But if your own hotel is in the tophabbo shizzle Doesn't it get filtered?? trol
 
Junior Spellweaver
Joined
Nov 27, 2011
Messages
176
Reaction score
74
Haha. This is great. Might add it. Not having a huge issue with advertisers from your site currently.
 
[̲̅$̲̅(̲̅1̲̅)̲̅$ ̲̅]
Joined
May 4, 2008
Messages
831
Reaction score
741
Wow I am surprised how fast this is..

I had to edit it a little to make it work ... I also added a bit of code to remove www and trailing slashes else they would have to type the whole url for the filter to work.

Do you mind I add this as a function to the ModCMS housekeeping?
 
Last edited:
Joined
Feb 5, 2010
Messages
415
Reaction score
244
Wow I am surprised how fast this is..

I had to edit it a little to make it work ... I also added a bit of code to remove www and trailing slashes else they would have to type the whole url for the filter to work.

Do you mind I add this as a function to the ModCMS housekeeping?

I don't mind at all as long as the URL to TopHabbo is in the page.

Also, mind releasing your edit? I'll add it to main post.


EDIT: I'm sucha nub, I deleted a variable and forgot to change it in the query. Also, I tested it and it's fully working.

Updated script added to main post and here:

Sorry for the inconvenience.
 
Last edited:
Junior Spellweaver
Joined
Nov 27, 2011
Messages
176
Reaction score
74
I don't mind at all as long as the URL to TopHabbo is in the page.

Also, mind releasing your edit? I'll add it to main post.


EDIT: I'm sucha nub, I deleted a variable and forgot to change it in the query. Also, I tested it and it's fully working.

Updated script added to main post and here:
 
Back
Top