Glype Proxy – Content Filtering

So again with the Glype Proxy, I needed to filter some content on all pages, so I had to write a little mod, it’s quick simple, and unreliable so yay!

To begin, Open up /includes/parser.php … and insert the following code (I put it around line 48):

// Dayjo - Filter Modification	  
// Open the filters file and filter all of the results. $filename = "filters.txt"; $fp = @fopen($filename, 'r'); if ($fp) { $array = explode("\n", fread($fp, filesize($filename))); foreach($array as $key => $val){ list($before,$after) = split("~",$val); $input = preg_replace($before,$after,$input); } }

Then, in the main Glype directory (/), create a text file called “filters.txt“.

Now, in this file you can provide text filters using regular expressions, separating with the tilde symbol ( ~ ), for instance, if you wanted to filter out swear words you would put the following into the file:

/shit/~****
/twat/~****

etc…

Somebody wished to modify page titles, so to do that you will need to something like:

/(.+)/~$1 - PROXIFIED BY DAYJO

Which would add ” – PROXIFIED BY DAYJO” to the original title. (Remove the $1 to get rid of the original title).

This modification could be used for a variety of reasons, removing images or ads, replacing content with your own, or making pages look funny by replacing the with teh… whatever takes your fancy.

Glype Proxy Theme – Clouds

I decided to design a little theme for Glype Proxy (www.glype.com).

As far as I can tell, it is fully compatible with;

  • Firefox 3.0.6
  • Google Chrome
  • Opera 9.63
  • Safari(PC) 3.2.1

So yes, that leaves out Internet Explorer. I may adjust it to be IE compatible, but for now, you’ll just have to use a better browser.


Preview

Download Now (clouds.zip 70kb)

iPhone

I have just discovered the wordpress iPhone application, which certainly helps the fact that I currently do not have internet at home (one of the most frustrating things in the world).

I’ve been sat in a cafe since 10am this morning, trying to use their Internet, however it’s about as reliable as the Internet that we don’t have in our house.

Thank god I bought an iPhone. It’s been nothing but a blessing (apart from when it hasn’t, which quite possibly could have just been entirely my fault).

There’s pretty good 3g signal here in Brighton so I do get emails, and can check facebook (why I would though I have no clue), so it’s not all bad! The only thing really that annoys me is trying to run a web-based business without the Internet, although I must say I’m doing pretty well considering!

There’s a few things that the iPhone is missing in my oppinion;

File handling – a simple way to manage any kind of file, to transfer to and from computers/email etc is the only real reason I need to come to a cafe and use my laptop.

Google Doc Support – which I blame entirely on google. No doubt this won’t be an issue for long, but I really would like to be able to write docs and spreadsheets!

Flash Support – speaks for itself. As a web designer, this really sucks!

I have much to do and not much time, so i’ll get on, and hopefully blog a little more now I can do so from my new best friend.

Thanks apple.