1<?php if (!defined('BB2_CORE')) die('I said no cheating!'); 2 3// Specialized screening for trackbacks 4function bb2_trackback($package) 5{ 6 // Web browsers don't send trackbacks 7 if ($package['is_browser']) { 8 return 'f0dcb3fd'; 9 } 10 11 // Proxy servers don't send trackbacks either 12 if (array_key_exists('Via', $package['headers_mixed']) || array_key_exists('Max-Forwards', $package['headers_mixed']) || array_key_exists('X-Forwarded-For', $package['headers_mixed']) || array_key_exists('Client-Ip', $package['headers_mixed'])) { 13 return 'd60b87c7'; 14 } 15 16 // Fake WordPress trackbacks 17 // Real ones do not contain Accept:, and have a charset defined 18 // Real WP trackbacks may contain Accept: depending on the HTTP 19 // transport being used by the sending host 20 if (strpos($package['headers_mixed']['User-Agent'], "WordPress/") !== FALSE) { 21 if (strpos($package['headers_mixed']['Content-Type'], "charset=") === FALSE) { 22 return 'e3990b47'; 23 } 24 } 25 return false; 26} 27 28?> 29