{"action":"closed","issue":{"url":"https://api.github.com/repos/plusfriend/auto_reply/issues/532","repository_url":"https://api.github.com/repos/plusfriend/auto_reply","labels_url":"https://api.github.com/repos/plusfriend/auto_reply/issues/532/labels{/name}","comments_url":"https://api.github.com/repos/plusfriend/auto_reply/issues/532/comments","events_url":"https://api.github.com/repos/plusfriend/auto_reply/issues/532/events","html_url":"https://github.com/plusfriend/auto_reply/issues/532","id":297112005,"number":532,"title":"PHP에서 http(s)://:server_url/message로 POST 요청이 제대로 들어오지 않는 것 같습니다.","user":{"login":"mjy9088","id":12760587,"avatar_url":"https://avatars3.githubusercontent.com/u/12760587?v=4","gravatar_id":"","url":"https://api.github.com/users/mjy9088","html_url":"https://github.com/mjy9088","followers_url":"https://api.github.com/users/mjy9088/followers","following_url":"https://api.github.com/users/mjy9088/following{/other_user}","gists_url":"https://api.github.com/users/mjy9088/gists{/gist_id}","starred_url":"https://api.github.com/users/mjy9088/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjy9088/subscriptions","organizations_url":"https://api.github.com/users/mjy9088/orgs","repos_url":"https://api.github.com/users/mjy9088/repos","events_url":"https://api.github.com/users/mjy9088/events{/privacy}","received_events_url":"https://api.github.com/users/mjy9088/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-02-14T14:20:12Z","updated_at":"2018-02-18T05:26:18Z","closed_at":"2018-02-18T05:26:17Z","author_association":"NONE","body":"server_url을 (파일이름).php?로 끝나게 했습니다.\r\n\r\n```\r\n<?php\r\n\r\nif($_SERVER['QUERY_STRING'] == '/keyboard')\r\n{\r\n    header('Content-Type: application/json; charset=utf-8');\r\n    echo '{\"type\":\"buttons\",\"buttons\":[\"버튼1\"]}';\r\n}\r\nelse if($_SERVER['QUERY_STRING'] == '/message')\r\n{\r\n    header('Content-Type: application/json; charset=utf-8');\r\n    ob_start();\r\n    var_dump($_REQUEST);\r\n    $msg = ob_get_contents();\r\n    ob_end_clean();\r\n    echo '{\"message\":{\"text\":\"'.str_replace(\"\\n\", \"\\\\n\", addslashes($msg)).'\"}}';\r\n}\r\nelse\r\n{\r\n    header('Content-Type: text/plain; charset=utf-8');\r\n    var_dump($_REQUEST);\r\n}\r\n\r\n?>\r\n```\r\n\r\n아파치는 Apache/2.4.25 (Raspbian), PHP는 PHP Version 7.0.27-0+deb9u1을 사용중입니다.\r\n\r\n`curl -XPOST 'http://(주소/파일명).php?/message' -d '{\"user_key\" : \"enc\", \"type\" : \"text\", \"content\" : \"cont\"}'`\r\n\r\n이렇게 테스트하면\r\n\r\n`{\"message\":{\"text\":\"array(2) {\\n  [\\\"/message\\\"]=>\\n  string(0) \\\"\\\"\\n  [\\\"{\\n\\\"user_key\\\"_:_\\\"enc\\\",_\\\"type\\\"_:_\\\"text\\\",_\\\"content\\\"_:_\\\"cont\\\"}\\\"]=>\\n  string(0) \\\"\\\"\\n}\\n\"}}`\r\n\r\n이렇게 응답합니다.\r\n\r\n그러나 실제 자동응답 메시지의 내용은\r\n\r\n```\r\narray(1) {\r\n  [\"/message\"]=>\r\n  string(0) \"\"\r\n}\r\n\r\n```\r\n\r\n이렇습니다.\r\n\r\n어떻게 해결해야 할까요?"}}
{"actor":{"display_login":"mjy9088"}}