diff --git a/src/models/SimpleStats.php b/src/models/SimpleStats.php index c58af71..a833cee 100644 --- a/src/models/SimpleStats.php +++ b/src/models/SimpleStats.php @@ -389,6 +389,8 @@ public static function getRefererInfo( string $refHeader = null): ?array { $urlParts = parse_url($refHeader); if( $urlParts && isset($urlParts['host'])){ //var_dump($urlParts); + // Sanitize yahoo urls specifically ? + if( strpos($urlParts['host'], 'yahoo.com')!==false && isset($urlParts['path']) && ($cut=strpos($urlParts['path'], '_ylt')) && $cut !== false) $urlParts['path'] = substr($urlParts['path'], 0, $cut); // Note: protocol and query strings are stripped $returnData['url']=$urlParts['host'].(isset($urlParts['path'])?$urlParts['path']:'');//str_replace('www.','', $urlParts['host'].$urlParts['path']; $returnData['host']=$urlParts['host'];