Automatic Hotel URL filter
Hello,
I made this script with the help of simpleHTML (class) for Obbo - Make friends, join the fun, get noticed! and I wanted to share it with everyone.
What is this script about?
Basically, the script gets the content from TopHabbo - Revolutionary Habbo Retro Topsite! 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: http://pastebin.com/6W8PvKEF
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, TopHabbo.COM
Re: Automatic Hotel URL filter
Nice script, but won't this just turn people away from using TopHabbo tho?
Re: Automatic Hotel URL filter
Quote:
Originally Posted by
JayNZ
Nice script, but won't this just turn people away from using TopHabbo tho?
Maybe for some, but the ultimate goal is to help hotel's 'fight' advertisers.
Re: Automatic Hotel URL filter
This is pretty cool. I could definitely use this. Thanks for the release.
Re: Automatic Hotel URL filter
Didn't block anything just added Word '' Replacement 'I\'m a dirty advertiser..' Strict '1'
Re: Automatic Hotel URL filter
Cheers, for sharing it with us :D
Re: Automatic Hotel URL filter
Re: Automatic Hotel URL filter
Looks nice But if your own hotel is in the tophabbo shizzle Doesn't it get filtered?? trol
Re: Automatic Hotel URL filter
Love it dude, thanks for this :)
Re: Automatic Hotel URL filter
Quote:
Originally Posted by
RoyZ
Looks nice But if your own hotel is in the tophabbo shizzle Doesn't it get filtered?? trol
That's why I put in the $hotel variable.
Re: Automatic Hotel URL filter
Haha. This is great. Might add it. Not having a huge issue with advertisers from your site currently.
Re: Automatic Hotel URL filter
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 http://, 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?
Re: Automatic Hotel URL filter
Quote:
Originally Posted by
BoomHotel
Didn't block anything just added Word '' Replacement 'I\'m a dirty advertiser..' Strict '1'
I had the same problem.
Re: Automatic Hotel URL filter
Quote:
Originally Posted by
Kryptos
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.
Posted via Mobile Device
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:
[PHP] Automatic Hotel filtering by TopHabbo.COM - Pastebin.com
Sorry for the inconvenience.
Thanks Kryptos. I was wondering if you could help code some stuff for my hotel?