sitepoint.com sitepoint.com

Rise of the Robots

Quick factual / historical note regarding Anonymizing RFI Attacks Through Google which Stefan and Ilia both referenced today. As far as I know the notion of “programming” legitimate 3rd-party web spiders to attack other sites was first raised back in 2001 by Michal Zalewski (also wikipedia) in Against the System: Rise of the Robots. Not that I’m hunting hacker-cred – ran into it via his book Silence on the Wire...

sitepoint.com sitepoint.com

This is just wrong...

Messing around with gscloud.pl against the webtuesday access logs and noticed a surprising number of referrals from Google for searches like 14th November – the 9th result takes you to to here! (I’m not logged out from Google so I assume these aren’t somehow weighted by my search history) Exploring further… Search: 16th May – 7th result to here. Search: 13th June – 3rd result to here Search: 11th...

sitepoint.com sitepoint.com

The Joy of Regular Expressions [4]

Having found some more joy, time to interrupt your Friday evening viewing, picking up the saga from where we left off last time. Contents Is that a date? The d meta character More sub patterns User friendlier dates The PCRE Extended Pattern Modifier Non-Capturing Sub Patterns Branching Hex Literals Exploding with Patterns The White space Meta character Capturing Split Delimiters Is that a date? You’ve already had your first...

sitepoint.com sitepoint.com

It's official: Javascript sucks harder than PHP

The surprise outcome of last nights webtuesday – Javascript sucks harder than PHP. I still can’t quite believe it. Maarten took the PHP corner against me in the Javascript corner, both of us shamelessly advocating each language under various headings – 1 minute max per topic – no outright lies although often bordering on truthiness. Verdicts provided by the audience, based on who could shout loudest from a...

sitepoint.com sitepoint.com

Puzzling Forecasts

In the same vein as this, here’s a real world puzzle that might serve as a nice (or annoying) interview question – relates to something I had to deal with at work today. There are a number of types of aviation weather bulletins, used worldwide and often critical to the operations of airlines etc. Many were designed prior to the dawn of XML and tend to have “interesting” formats – fun to understand, even...

sitepoint.com sitepoint.com

The Joy of Regular Expressions [3]

Following on from the last part, this one is more of an intermission – a round up of regex syntax seen so far and a couple of links following feedback. Part 4 is here. Reads First you have to check out Andrei’s Regex Clinic (slides / pdf) – even if you don’t get it all, it’s worth it for the pictures at the start ;) That’s Andrei as in Zmievski, as in works at Yahoo, can be blamed for Smarty and...

sitepoint.com sitepoint.com

The Joy of Regular Expressions [2]

So continuing the fun started here… Contents Part 2 Where we’ve been so far… Hunting for .jp(e)gs Escaping Meta Characters Search and Replace preg_quote() preg_replace() Word Boundaries, Word Characters… and everything else Sub-patterns Spot the XSS Hole eval() is evil! preg_replace_callback() Part 3 is here Where we’ve been so far… First a quick summary of what we covered in part...

sitepoint.com sitepoint.com

The Joy of Regular Expressions [1]

Was asked recently if I knew of any good regular expressions tutorials (preferably in PHP). The question came from someone certainly smart enough to “get” regular expressions but they’d been unable to find accessible help. Most regular expression tutorials I’ve seen are organised around teaching the syntax incrementally, which can quickly lead to mental overload. Examples commonly revolve around strings like...

sitepoint.com sitepoint.com

PHP extension for Cairo graphics library

Thanks to tip off from Jared “Ren” Williams (is that you? – any link?) here – the Cairo wrapper extension by Hartmut Holzgraefe – nice demo. Cairo is the “next generation” vector graphics library for Linux and very cool to have it available in PHP. Also cool about the extension was created using PEAR::CodeGen_PECL, which Hartmut describes here: look Mum – no C! (well almost). This raises...