Added error handling for preg_replace

This code is from mod_page and was to detect backtrack failures in preg_replace

git-svn-id: https://svn.muze.nl/svn/ariadne-php5/trunk@5995 7882d7ee-46e0-0310-a255-a28a61b628e4
Merging changes from mod_page

git-svn-id: https://svn.muze.nl/svn/ariadne-php5/trunk@5996 7882d7ee-46e0-0310-a255-a28a61b628e4
Replace internal httprequest function with ar/http/client

git-svn-id: https://svn.muze.nl/svn/ariadne-php5/trunk@5997 7882d7ee-46e0-0310-a255-a28a61b628e4
Cleanup whitespace

git-svn-id: https://svn.muze.nl/svn/ariadne-php5/trunk@5998 7882d7ee-46e0-0310-a255-a28a61b628e4
replace custom 'max' function with building one

git-svn-id: https://svn.muze.nl/svn/ariadne-php5/trunk@5999 7882d7ee-46e0-0310-a255-a28a61b628e4
Rewrote statement for readability

git-svn-id: https://svn.muze.nl/svn/ariadne-php5/trunk@6000 7882d7ee-46e0-0310-a255-a28a61b628e4