It would be nice to see a sample of the code you were trying to use in PHP, but try the following (remember to change $_SERVER["HTTP_REFERER"] to your input variable):
if (preg_match('#http://(?:(?:(?:(?:[0-9a-z]|[0-9a-z](?:[\\x2d0-9a-z]?)*[0-9a-z])\\x2e)?)*(?:[a-z]|[a-z](?:[\\x2d0-9a-z]?)*[0-9a-z])|\\d+\\x2e\\d+\\x2e\\d+\\x2e\\d+)(?::\\d+)?(?:/(?:(?:[!\\x24\'-\\x2e0-9_a-z]|%[0-9a-f][0-9a-f]|[&:;=@])?)*(?:(?:/(?:(?:[!\\x24\'-\\x2e0-9_a-z]|%[0-9a-f][0-9a-f]|[&:;=@])?)*)?)*(?:\\x3f(?:(?:[!\\x24\'-\\x2e0-9_a-z]|%[0-9a-f][0-9a-f]|[&:;=@])?)*)?)?#i', $_SERVER["HTTP_REFERER"], $l_Results)) {
$result = $l_Results[1];
} else {
$result = "";
}
Templar
2009-06-29 21:57:03