<?php
define ('SPECIAL', '_url');
define ('URL_ABS', 'http://www.yaronet.com/');
define ('URL_REL', 'http://www.yaronet.com/blogs/');
if (isset ($_GET[SPECIAL]))
{
$preserve = implode ('|', array
(
'js'
));
$qs = '';
foreach ($_GET as $key => $val)
if ($key != SPECIAL)
$qs = $qs . ($qs ? '&' : '?') . urlencode ($key) . '=' . urlencode ($val);
$data = file_get_contents ('http://www.yaronet.com/blogs/' . $_GET[SPECIAL] . $qs);
$data = preg_replace ('@=[\'"]/([^\'":]+\\.(' . $preserve . '))[\'"]@i', '="' . URL_ABS . '$1"', $data);
$data = preg_replace ('@=[\'"]([^\'":]+\\.(' . $preserve . '))[\'"]@i', '="' . URL_REL . '$1"', $data);
header ('Content-Type: text/html; charset=iso-8859-1');
echo $data;
}