msgbartop
More than the bits & pieces
msgbarbottom

21 Jan 08 Parsing the Links in HTML Source

I use this handy-dandy Regular Expression:

preg_match_all("/href=[\'|\"]http:\/\/([a-zA-Z0-9\.\/\?\-\_\:\=]*)[\'|\"]/i", $haystack, $links_array);

This fills an array ($links_array) with any URLs found in $haystack. No more complex than that, though as you can see, regular expressions can be complex in their own right - they're powerful!

19 Jan 08 Sanitizing User Input in PHP: Bobby Tables Strikes Again!

This is a solved problem, yet the volume of applications that are exposed to vulnerabilities due to improperly filtered input is staggering.

(more...)