<?php $host = parse_url('http://www.google.co.uk/test.html'); preg_match('/(.*?)((\.co)?.[a-z]{2,4})$/i', $host['host'], $m); $ext = isset($m[2]) ? $m[2]: '';
You have javascript disabled. You will not be able to edit any code.