Created
June 20, 2016 15:20
-
-
Save mpstenson/4e44fc470d54cf67245118b064ed1221 to your computer and use it in GitHub Desktop.
unserialize tEmailHeaders from the HelpSpot API
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 | |
$var=html_entity_decode("a:25:{s:12:"delivered-to";a:2:{i:0;s:32:"matts-test-instance@helpspot.com";i:1;s:32:"matts-test-instance@helpspot.com";}s:11:"return-path";a:2:{i:0;s:24:"<matt.stenson@gmail.com>";i:1;s:24:"<matt.stenson@gmail.com>";}s:8:"received";a:4:{i:0;s:208:"from director7.mail.ord1c.rsapps.net ([172.28.128.196]) by store367a.mail.iad3a.rsapps.net (Dovecot) with LMTP id N2bALtrEWlfIbgAASskMtg for <matts-test-instance@helpspot.com>; Fri, 10 Jun 2016 10:45:29 -0400";i:1;s:214:"from smtp44.gate.ord1c ([172.28.255.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) by director7.mail.ord1c.rsapps.net (Dovecot) with LMTP id bjRlPqWWDVcXCQAAqdfm7w ; Fri, 10 Jun 2016 10:45:29 -0400";i:2;s:349:"from [209.85.218.68] ([209.85.218.68:33976] helo=mail-oi0-f68.google.com) by smtp44.gate.ord1c.rsapps.net (envelope-from <matt.stenson@gmail.com>) (ecelerity 2.2.3.49 r(42060/42061)) with ESMTPS (cipher=AES128-SHA subject="/C=US/ST=California/L=Mountain View/O=Google Inc/CN=smtp.gmail.com") id B9/86-17560-882DA575; Fri, 10 Jun 2016 10:45:28 -0400";i:3;s:135:"by mail-oi0-f68.google.com with SMTP id r4so13608813oib.1 for <matts-test-instance@helpspot.com>; Fri, 10 Jun 2016 07:45:28 -0700 (PDT)";}s:16:"x-spam-threshold";s:2:"95";s:12:"x-spam-score";s:1:"0";s:11:"x-spam-flag";s:2:"NO";s:15:"x-virus-scanned";s:2:"OK";s:22:"authentication-results";a:2:{i:0;s:72:"smtp44.gate.ord1c.rsapps.net header.DKIM-Signature=@gmail.com; dkim=pass";i:1;s:143:" smtp44.gate.ord1c.rsapps.net x-tls.subject="/C=US/ST=California/L=Mountain View/O=Google Inc/CN=smtp.gmail.com"; auth=pass (cipher=AES128-SHA)";}s:28:"x-messagesniffer-scan-result";s:1:"0";s:22:"x-messagesniffer-rules";s:12:"0-0-0-3070-c";s:18:"x-cmae-scan-result";s:1:"0";s:15:"x-cnfs-analysis";s:105:"v=2.2 cv=DJfN2GFb c=1 sm=0 tr=0 a=jXSsW8IEtbrQOUZwQrvHUQ==:117 a=pD_ry4oyNxEA:10 a=_-Ne7qywE6DHSfEP9qcA:9";s:9:"x-orig-to";s:32:"matts-test-instance@helpspot.com";s:16:"x-originating-ip";s:15:"[209.85.218.68]";s:14:"dkim-signature";s:511:"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=ZfXQILiy/v2US2szPWe9+hAF59Kzt6B+B1RRV8T0zW8=; b=GsuN1UQT+kxAUEAH0vWHDZvzHDUaV/xfEVBeMCMMUwpIMJw03OWr+T6JQH4T+4rptJ Xv+Eh8kenfivQi0ysPXWa7swbHgBVI47PJuFy6e6bAoLPjbIcGpV7R4e1wh5mWQO6HYx gbSqZ1J9VjqyRXAhaRROCmk1TwsUeNRjUVARY8ldp0FgfMLjsOmHkvb4E5+AsFRJ1UJl KDieckBw/R8wgxAc6Vc824CNCVRsTD1kLb/cPGmV71qfEqeO4NwxVhJiIcWqkF+u+kuV R3EPP+p56t6cDzRi0j5BkDDRg7nrqInbxR3ZXhnNwCj3X0JjrGY9u5Z5Vda4Oy4hOewQ 2CNw==";s:23:"x-google-dkim-signature";s:530:"v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ZfXQILiy/v2US2szPWe9+hAF59Kzt6B+B1RRV8T0zW8=; b=ame4fMJsCDMs44kqtFWKs8RVhr7EH/x+qOnO8tspWcbP74iW66EFQshmWhL5DXCZEe 7OLYvMJbZhuG0jpCiMNuOdjLhUaJ1Hx7COnfmPtKFcTcVFLh3gYecuK4eOd2guBUg6DP 0yyYJGqQRTnKcZ+lm/SzGixbjftKinerJwcnNHThffpEMgi66ZhLbTPxQc13L0rLsXIF k03ZVSzfYs0N2E2TPqaBzqj3jgsX05FbdxbhuyQrYORaJGjtlT5ccPnl7hpt+ez7GB5b KnOfmkLAVZY5U3UXK1tfVAIe7qlqlj61IZ3ZMIjOI7wieY3Yjz6Je0lQEhy7kqIPL2ku uz9w==";s:18:"x-gm-message-state";s:88:"ALyK8tI8tK1N88DBe2wDv2RM3D9hA+c33ujQh+5YPgGgpOIUujPOvWRVv5zRg+WfT3xmRYhk6pt9ueeIH0ks/Q==";s:10:"x-received";s:100:"by 10.202.229.1 with SMTP id c1mr1222193oih.180.1465569927939; Fri, 10 Jun 2016 07:45:27 -0700 (PDT)";s:12:"mime-version";s:3:"1.0";s:4:"from";s:40:"Matthew Stenson <matt.stenson@gmail.com>";s:4:"date";s:31:"Fri, 10 Jun 2016 14:45:18 +0000";s:10:"message-id";s:68:"<CALmgRaYxApm1Uumrv_peTo4TA57Y7h4gRmVpk8JZzFuZObj=Uw@mail.gmail.com>";s:7:"subject";s:11:"Trigger it!";s:2:"to";s:54:"matts-test-instance <matts-test-instance@helpspot.com>";s:12:"content-type";s:60:"multipart/alternative; boundary=001a11403486f2cd540534ed96a0";}", ENT_COMPAT, 'UTF-8'); | |
$var = trim($var); | |
if(is_string($var) && !empty($var)){ | |
var_dump(unserialize($var)); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment