Skip to content

Instantly share code, notes, and snippets.

View sotb0rlando's full-sized avatar

Jeremy Wood sotb0rlando

View GitHub Profile
@moertel
moertel / deobfuscate_gclid.php
Created April 22, 2014 17:42
decode google click id
<?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}) |