-2

マンドリルを使用して、受信メールを投稿しています。新しいメールを受信したときにマンドリルが投稿する内容は次のとおりです-> http://help.mandrill.com/entries/22092308-What-is-the-format-of-inbound-email-webhooks-

また、$ _ REQUESTで取得したものもあります(フォーマットが適切でないことをお詫びします)。 [{\"event\":\"inbound\",\"ts\":1361798154,\"msg\":{\"raw_msg\":\"Received: from nm11-vm1.bullet.mail.sg3.yahoo.com (nm11-vm1.bullet.mail.sg3.yahoo.com [106.10.148.240])\\n\\tby ip-10-138-250-144 (Postfix) with ESMTPS id 663A4136204D\\n\\tfor <>; Mon, 25 Feb 2013 13:15:54 +0000 (UTC)\\nReceived: from [106.10.166.112] by nm11.bullet.mail.sg3.yahoo.com with NNFMP; 25 Feb 2013 13:15:53 -0000\\nReceived: from [106.10.151.171] by tm1.bullet.mail.sg3.yahoo.com with NNFMP; 25 Feb 2013 13:15:53 -0000\\nReceived: from [127.0.0.1] by omp1011.mail.sg3.yahoo.com with NNFMP; 25 Feb 2013 13:15:53 -0000\\nX-Yahoo-Newman-Property: ymail-3\\nX-Yahoo-Newman-Id: 250040.22861.bm@omp1011.mail.sg3.yahoo.com\\nReceived: (qmail 28099 invoked by uid 60001); 25 Feb 2013 13:15:53 -0000\\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed\\/relaxed; d=yahoo.co.in; s=s1024; t=1361798153; bh=BDFj0kYtFyAwYeMROJlckEQlebiL67q4OCeBIQv8Ptg=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=JTaQH8PfSRIt\\/tYN16h6m1TeqlfEilid7FHTCoLdgYKL1CKf1s92DXm0vNKycLvTK7vmGr61e8SOxv2yGghCgOFHEumbLrF0kz+dhDeXBzyqrMPLcXT0w4uiUTJv+YtlsXYELvzN2ULhVwE1BXst2ok\\/Fj5AxpmRSJ8\\/0lxxUrY=\\nDomainKey-Signature:a=rsa-sha1; q=dns; c=nofws;\\n s=s1024; d=yahoo.co.in;\\n h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type;\\n b=fEBcmdXcrijuQ\\/LkRh3mlZVEdQ7E\\/DzZ2rRlMZEUbr2Z6sv0SbmADNiea4a4WZImIJTyeXdgeOTrV1peLkegTUzf5UxBQW18NE0Sjlay54kAhADfgt6N+HUoiSH+Psj4gTSbOYv\\/Ij1x2CmR645JShaz2x1TfNYgvYRb05VZWv8=;\\nX-YMail-OSG: buuv6IIVM1kj3NrZiivkBVYfFcT.P8xs1KJk1zKUlFASQ5M\\n 0rxt7ojMEC0KSn8S8s4GSaBBW.f4Pd8x9V4dCr8BPKXvnvcZQhqM2Wu10meZ\\n jC.N8I7D3XXxzRI15ez1zICJg2fZkng2x5FQqUhElC.y03G6cSZJIFPSBitM\\n 0R6RnJA0zhWnWQv7UAD.KdKiKgnEPSA9lZpRqcTGHh8uNYuu6bWiKv9wXnGG\\n rzKei4dmAv5lrEhD9iXVSQCQw_2S9RzQd08B3vBg0keF3vBMBnmCCdyqdxRK\\n 4IQbYZZGBXTt3AQz.rdVxjTicu2rTvkGLkOb9JN0qA3NURs2BJYvd0TMNGQn\\n 9xWGKTIQmJ.pla6Tw8_vQUCkJuRCl7tlKavXX6U_ocY34VjDTthwKHf.pCYo\\n 8mwtfsLpHC9ZklRu4vSIM6kGZLjQoux4mz0qJduVBaYYoRboY_kH622MyI.m\\n sBA--\\nReceived: from [182.68.19.112] by web192402.mail.sg3.yahoo.com via HTTP; Mon, 25 Feb 2013 21:15:52 SGT\\nX-Rocket-MIMEInfo: 001.001,U2F5cyBXaG8BMAEBAQE-\\nX-Mailer: YahooMailWebService\\/0.8.134.513\\nMessage-ID: <1361798152.24847.YahooMailNeo@web192402.mail.sg3.yahoo.com>\\nDate: Mon, 25 Feb 2013 21:15:52 +0800 (SGT)\\nFrom: Lucky Soni <lp.soni@yahoo.co.in>\\nReply-To: Lucky Soni <lp.soni@yahoo.co.in>\\nSubject: Hello World\\nTo: \\\"\\\" <>\\nMIME-Version: 1.0\\nContent-Type: multipart\\/alternative; boundary=\\\"1577518589-1280633723-1361798152=:24847\\\"\\n\\n--1577518589-1280633723-1361798152=:24847\\nContent-Type: text\\/plain; charset=utf-8\\nContent-Transfer-Encoding: quoted-printable\\n\\nSays Who\\n--1577518589-1280633723-1361798152=:24847\\nContent-Type: text\\/html; charset=utf-8\\nContent-Transfer-Encoding: quoted-printable\\n\\n<html><body><div style=3D\\\"color:#000; background-color:#fff; font-family:ve=\\nrdana, helvetica, sans-serif;font-size:12pt\\\"><div>Says Who<\\/div><\\/div><\\/bod=\\ny><\\/html>\\n--1577518589-1280633723-1361798152=:24847--\",\"headers\":{\"Received\":[\"from nm11-vm1.bullet.mail.sg3.yahoo.com (nm11-vm1.bullet.mail.sg3.yahoo.com [106.10.148.240]) by ip-10-138-250-144 (Postfix) with ESMTPS id 663A4136204D for <>; Mon, 25 Feb 2013 13:15:54 +0000 (UTC)\",\"from [106.10.166.112] by nm11.bullet.mail.sg3.yahoo.com with NNFMP; 25 Feb 2013 13:15:53 -0000\",\"from [106.10.151.171] by tm1.bullet.mail.sg3.yahoo.com with NNFMP; 25 Feb 2013 13:15:53 -0000\",\"from [127.0.0.1] by omp1011.mail.sg3.yahoo.com with NNFMP; 25 Feb 2013 13:15:53 -0000\",\"(qmail 28099 invoked by uid 60001); 25 Feb 2013 13:15:53 -0000\",\"from [182.68.19.112] by web192402.mail.sg3.yahoo.com via HTTP; Mon, 25 Feb 2013 21:15:52 SGT\"],\"X-Yahoo-Newman-Property\":\"ymail-3\",\"X-Yahoo-Newman-Id\":\"250040.22861.bm@omp1011.mail.sg3.yahoo.com\",\"Dkim-Signature\":\"v=1; a=rsa-sha256; c=relaxed\\/relaxed; d=yahoo.co.in; s=s1024; t=1361798153; bh=BDFj0kYtFyAwYeMROJlckEQlebiL67q4OCeBIQv8Ptg=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=JTaQH8PfSRIt\\/tYN16h6m1TeqlfEilid7FHTCoLdgYKL1CKf1s92DXm0vNKycLvTK7vmGr61e8SOxv2yGghCgOFHEumbLrF0kz+dhDeXBzyqrMPLcXT0w4uiUTJv+YtlsXYELvzN2ULhVwE1BXst2ok\\/Fj5AxpmRSJ8\\/0lxxUrY=\",\"Domainkey-Signature\":\"a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=fEBcmdXcrijuQ\\/LkRh3mlZVEdQ7E\\/DzZ2rRlMZEUbr2Z6sv0SbmADNiea4a4WZImIJTyeXdgeOTrV1peLkegTUzf5UxBQW18NE0Sjlay54kAhADfgt6N+HUoiSH+Psj4gTSbOYv\\/Ij1x2CmR645JShaz2x1TfNYgvYRb05VZWv8=;\",\"X-Ymail-Osg\":\"buuv6IIVM1kj3NrZiivkBVYfFcT.P8xs1KJk1zKUlFASQ5M 0rxt7ojMEC0KSn8S8s4GSaBBW.f4Pd8x9V4dCr8BPKXvnvcZQhqM2Wu10meZ jC.N8I7D3XXxzRI15ez1zICJg2fZkng2x5FQqUhElC.y03G6cSZJIFPSBitM 0R6RnJA0zhWnWQv7UAD.KdKiKgnEPSA9lZpRqcTGHh8uNYuu6bWiKv9wXnGG rzKei4dmAv5lrEhD9iXVSQCQw_2S9RzQd08B3vBg0keF3vBMBnmCCdyqdxRK 4IQbYZZGBXTt3AQz.rdVxjTicu2rTvkGLkOb9JN0qA3NURs2BJYvd0TMNGQn 9xWGKTIQmJ.pla6Tw8_vQUCkJuRCl7tlKavXX6U_ocY34VjDTthwKHf.pCYo 8mwtfsLpHC9ZklRu4vSIM6kGZLjQoux4mz0qJduVBaYYoRboY_kH622MyI.m sBA--\",\"X-Rocket-Mimeinfo\":\"001.001,U2F5cyBXaG8BMAEBAQE-\",\"X-Mailer\":\"YahooMailWebService\\/0.8.134.513\",\"Message-Id\":\"<1361798152.24847.YahooMailNeo@web192402.mail.sg3.yahoo.com>\",\"Date\":\"Mon, 25 Feb 2013 21:15:52 +0800 (SGT)\",\"From\":\"Lucky Soni <lp.soni@yahoo.co.in>\",\"Reply-To\":\"Lucky Soni <lp.soni@yahoo.co.in>\",\"Subject\":\"Hello World\",\"To\":\"\\\"\\\" <>\",\"Mime-Version\":\"1.0\",\"Content-Type\":\"multipart\\/alternative; boundary=\\\"1577518589-1280633723-1361798152=:24847\\\"\"},\"text\":\"Says Who\\n\",\"html\":\"<html><body><div style=\\\"color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:12pt\\\"><div>Says Who<\\/div><\\/div><\\/body><\\/html>\\n\",\"from_email\":\"lp.soni@yahoo.co.in\",\"from_name\":\"Lucky Soni\",\"to\":[[\"\",\"\"]],\"subject\":\"Hello World\",\"email\":\"\",\"tags\":[],\"sender\":null}}]

「テキスト」を取得し(「ctrl / command +F」を使用して「text」という単語を検索してください:)、mySQlに挿入する必要があります。助けてください。ありがとう

注:私はすでにjson_deocdeを試しましたが、うまくいきません。

4

2 に答える 2

2

json_deocdeを使用してjsonをデコードしようとしましたか? https://www.php.net/manual/en/function.json-decode.php

于 2013-02-25T15:15:27.197 に答える
0

同じ問題が発生しました。json_decodeを実行するよりも、最初に生のHTTP POSTをプルしてurldecode()を使用することになりました。

于 2014-05-08T19:53:43.587 に答える