This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function gclid_decode($gclid, $splitTimestamp = true) | |
{ | |
// Copyright 2013 Deed Poll Office Ltd, UK <https://deedpolloffice.com> | |
// Licensed under Apache Licence v2.0 <http://apache.org/licenses/LICENSE-2.0> | |
// http://blog.deedpolloffice.com/articles/decoding-gclid-parameter | |
preg_match_all('/ | |
(?=[\x5\xd\x15\x1d%\-5=EMU\]emu}\x85\x8d\x95\x9d\xa5\xad\xb5\xbd\xc5\xcd\xd5 | |
\xdd\xe5\xed\xf5\xfd]) # 32-bit wire type | |
([\x80-\xff]*[\0-\x7f])(.{4}) | |