{"id":16865,"date":"2024-03-16T05:17:33","date_gmt":"2024-03-15T20:17:33","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/php%e3%81%a7%e3%81%aewebsocket%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%e4%bd%95%e3%81%a7%e3%81%99%e3%81%8b%ef%bc%9f\/"},"modified":"2025-08-06T09:10:20","modified_gmt":"2025-08-06T00:10:20","slug":"php%e3%81%a7%e3%81%aewebsocket%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%e4%bd%95%e3%81%a7%e3%81%99%e3%81%8b%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/php%e3%81%a7%e3%81%aewebsocket%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%e4%bd%95%e3%81%a7%e3%81%99%e3%81%8b%ef%bc%9f\/","title":{"rendered":"php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f"},"content":{"rendered":"<p>PHP\u3092\u4f7f\u7528\u3057\u3066WebSocket\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u30b9\u30c6\u30c3\u30d7\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<ol>\n<li>PHP\u306eWebSocket\u30e9\u30a4\u30d6\u30e9\u30ea\uff08\u4f8b\uff1aRatchet\u3084Swoole\uff09\u3092\u4f7f\u7528\u3057\u3066WebSocket\u30b5\u30fc\u30d0\u30fc\u3092\u4f5c\u6210\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u53d7\u4fe1\u3057\u305fWebSocket\u63a5\u7d9a\u3092\u76e3\u8996\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n<li>WebSocket\u306e\u63a5\u7d9a\u3068\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u51e6\u7406\uff1a\u65b0\u3057\u3044WebSocket\u306e\u63a5\u7d9a\u3068\u53d7\u4fe1\u3057\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306e\u30ed\u30b8\u30c3\u30af\u3092\u30b5\u30fc\u30d0\u30fc\u4e0a\u3067\u5b9f\u88c5\u3057\u307e\u3059\u3002\u63a5\u7d9a\u306e\u30aa\u30fc\u30d7\u30f3\u3001\u30af\u30ed\u30fc\u30ba\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u51e6\u7406\u3092\u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u3084\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n<li>\u30e1\u30c3\u30bb\u30fc\u30b8\u9001\u4fe1\uff1a\u7279\u5b9a\u306eWebSocket\u63a5\u7d9a\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1\u3059\u308b\u304b\u3001\u3059\u3079\u3066\u306e\u63a5\u7d9a\u306b\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8\u3059\u308b\u305f\u3081\u306b\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u30b3\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u30b5\u30fc\u30d0\u30fc\u304c\u63d0\u4f9b\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n<li>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u51e6\u7406\uff1a\u30b5\u30fc\u30d0\u304b\u3089\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u3067\u30ed\u30b8\u30c3\u30af\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002 WebSocket\u63a5\u7d9a\u3092\u4ecb\u3057\u3066\u3001\u30b5\u30fc\u30d0\u306f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u30d7\u30c3\u30b7\u30e5\u3067\u304d\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u3053\u308c\u3089\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u5fdc\u7b54\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ol>\n<p>\u4ee5\u4e0b\u662f\u4e00\u500b\u7c21\u55ae\u7684\u7bc4\u4f8b\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528Ratchet\u5eab\u5275\u5efaWebSocket\u4f3a\u670d\u5668\u7684\u57fa\u672c\u7528\u6cd5\uff1a<\/p>\n<pre class=\"post-pre\"><code><span class=\"hljs-keyword\">require<\/span> <span class=\"hljs-string\">'vendor\/autoload.php'<\/span>;\r\n\r\n<span class=\"hljs-keyword\">use<\/span> <span class=\"hljs-title\">Ratchet<\/span>\\<span class=\"hljs-title\">MessageComponentInterface<\/span>;\r\n<span class=\"hljs-keyword\">use<\/span> <span class=\"hljs-title\">Ratchet<\/span>\\<span class=\"hljs-title\">ConnectionInterface<\/span>;\r\n<span class=\"hljs-keyword\">use<\/span> <span class=\"hljs-title\">Ratchet<\/span>\\<span class=\"hljs-title\">Server<\/span>\\<span class=\"hljs-title\">IoServer<\/span>;\r\n<span class=\"hljs-keyword\">use<\/span> <span class=\"hljs-title\">Ratchet<\/span>\\<span class=\"hljs-title\">Http<\/span>\\<span class=\"hljs-title\">HttpServer<\/span>;\r\n<span class=\"hljs-keyword\">use<\/span> <span class=\"hljs-title\">Ratchet<\/span>\\<span class=\"hljs-title\">WebSocket<\/span>\\<span class=\"hljs-title\">WsServer<\/span>;\r\n\r\n<span class=\"hljs-class\"><span class=\"hljs-keyword\">class<\/span> <span class=\"hljs-title\">MyWebSocketServer<\/span> <span class=\"hljs-keyword\">implements<\/span> <span class=\"hljs-title\">MessageComponentInterface<\/span> <\/span>{\r\n    <span class=\"hljs-keyword\">protected<\/span> <span class=\"hljs-variable\">$clients<\/span>;\r\n\r\n    <span class=\"hljs-keyword\">public<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">__construct<\/span>() <\/span>{\r\n        <span class=\"hljs-variable language_\">$this<\/span>-&gt;clients = <span class=\"hljs-keyword\">new<\/span> <span class=\"hljs-title class_\">\\SplObjectStorage<\/span>;\r\n    }\r\n\r\n    <span class=\"hljs-keyword\">public<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">onOpen<\/span>(<span class=\"hljs-params\">ConnectionInterface <span class=\"hljs-variable\">$conn<\/span><\/span>) <\/span>{\r\n        <span class=\"hljs-variable language_\">$this<\/span>-&gt;clients-&gt;<span class=\"hljs-title function_ invoke__\">attach<\/span>(<span class=\"hljs-variable\">$conn<\/span>);\r\n        <span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"New connection! (<span class=\"hljs-subst\">{$conn-&gt;resourceId}<\/span>)\\n\"<\/span>;\r\n    }\r\n\r\n    <span class=\"hljs-keyword\">public<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">onMessage<\/span>(<span class=\"hljs-params\">ConnectionInterface <span class=\"hljs-variable\">$from<\/span>, <span class=\"hljs-variable\">$msg<\/span><\/span>) <\/span>{\r\n        <span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"Received message: <span class=\"hljs-subst\">{$msg}<\/span>\\n\"<\/span>;\r\n        <span class=\"hljs-keyword\">foreach<\/span> (<span class=\"hljs-variable language_\">$this<\/span>-&gt;clients <span class=\"hljs-keyword\">as<\/span> <span class=\"hljs-variable\">$client<\/span>) {\r\n            <span class=\"hljs-variable\">$client<\/span>-&gt;<span class=\"hljs-title function_ invoke__\">send<\/span>(<span class=\"hljs-variable\">$msg<\/span>);\r\n        }\r\n    }\r\n\r\n    <span class=\"hljs-keyword\">public<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">onClose<\/span>(<span class=\"hljs-params\">ConnectionInterface <span class=\"hljs-variable\">$conn<\/span><\/span>) <\/span>{\r\n        <span class=\"hljs-variable language_\">$this<\/span>-&gt;clients-&gt;<span class=\"hljs-title function_ invoke__\">detach<\/span>(<span class=\"hljs-variable\">$conn<\/span>);\r\n        <span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"Connection <span class=\"hljs-subst\">{$conn-&gt;resourceId}<\/span> has disconnected\\n\"<\/span>;\r\n    }\r\n\r\n    <span class=\"hljs-keyword\">public<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">onError<\/span>(<span class=\"hljs-params\">ConnectionInterface <span class=\"hljs-variable\">$conn<\/span>, \\<span class=\"hljs-built_in\">Exception<\/span> <span class=\"hljs-variable\">$e<\/span><\/span>) <\/span>{\r\n        <span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"An error occurred: <span class=\"hljs-subst\">{$e-&gt;getMessage()}<\/span>\\n\"<\/span>;\r\n        <span class=\"hljs-variable\">$conn<\/span>-&gt;<span class=\"hljs-title function_ invoke__\">close<\/span>();\r\n    }\r\n}\r\n\r\n<span class=\"hljs-variable\">$server<\/span> = <span class=\"hljs-title class_\">IoServer<\/span>::<span class=\"hljs-title function_ invoke__\">factory<\/span>(\r\n    <span class=\"hljs-keyword\">new<\/span> <span class=\"hljs-title class_\">HttpServer<\/span>(\r\n        <span class=\"hljs-keyword\">new<\/span> <span class=\"hljs-title class_\">WsServer<\/span>(\r\n            <span class=\"hljs-keyword\">new<\/span> <span class=\"hljs-title class_\">MyWebSocketServer<\/span>()\r\n        )\r\n    ),\r\n    <span class=\"hljs-number\">8080<\/span>\r\n);\r\n\r\n<span class=\"hljs-variable\">$server<\/span>-&gt;<span class=\"hljs-title function_ invoke__\">run<\/span>();\r\n<\/code><\/pre>\n<p>\u4e0a\u8a18\u306e\u4f8b\u3067\u306f\u3001Ratchet\u306eMessageComponentInterface\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5b9f\u88c5\u3057\u305fMyWebSocketServer\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002onOpen\u30e1\u30bd\u30c3\u30c9\u3067\u306f\u3001\u65b0\u3057\u3044\u63a5\u7d9a\u3092\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30ea\u30b9\u30c8\u306b\u8ffd\u52a0\u3057\u3001\u65b0\u3057\u3044\u63a5\u7d9a\u306e\u30ea\u30bd\u30fc\u30b9ID\u3092\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u51fa\u529b\u3057\u307e\u3059\u3002onMessage\u30e1\u30bd\u30c3\u30c9\u3067\u306f\u3001\u53d7\u4fe1\u3057\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u3059\u3079\u3066\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8\u3057\u307e\u3059\u3002onClose\u30e1\u30bd\u30c3\u30c9\u3067\u306f\u3001\u30af\u30ed\u30fc\u30ba\u3055\u308c\u305f\u63a5\u7d9a\u3092\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30ea\u30b9\u30c8\u304b\u3089\u524a\u9664\u3057\u3001\u63a5\u7d9a\u304c\u9589\u3058\u3089\u308c\u305f\u3053\u3068\u3092\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u51fa\u529b\u3057\u307e\u3059\u3002onError\u30e1\u30bd\u30c3\u30c9\u3067\u306f\u3001\u3059\u3079\u3066\u306e\u30a8\u30e9\u30fc\u3092\u51e6\u7406\u3057\u3001\u63a5\u7d9a\u3092\u9589\u3058\u307e\u3059\u3002<\/p>\n<p>\u6700\u5f8c\u306b\u3001IoServer\u30af\u30e9\u30b9\u3092\u4f7f\u7528\u3057\u3066WebSocket\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3057\u30018080\u30dd\u30fc\u30c8\u3092\u76e3\u8996\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3001\u3053\u308c\u306f\u5358\u306a\u308b\u30b7\u30f3\u30d7\u30eb\u306a\u4f8b\u3067\u3059\u3002\u5b9f\u969b\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u7570\u306a\u308b\u30bf\u30a4\u30d7\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3084\u63a5\u7d9a\u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306b\u3088\u308a\u591a\u304f\u306e\u30ed\u30b8\u30c3\u30af\u304c\u5fc5\u8981\u306b\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP\u3092\u4f7f\u7528\u3057\u3066WebSocket\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u30b9\u30c6\u30c3\u30d7\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 PHP\u306eWebSocket\u30e9\u30a4\u30d6\u30e9\u30ea\uff08\u4f8b\uff1aRatchet\u3084Swoole\uff09\u3092\u4f7f\u7528\u3057\u3066WebSocket\u30b5\u30fc\u30d0\u30fc\u3092\u4f5c\u6210\u3057\u3066\u307f\u3066\u304f\u3060\u3055 [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[16,26],"class_list":["post-16865","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-16","tag-26"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f\" \/>\n<meta property=\"og:description\" content=\"php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-15T20:17:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-06T00:10:20+00:00\" \/>\n<meta name=\"author\" content=\"\u5149, \u660e\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u5149, \u660e\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"6\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/php%e3%81%a7%e3%81%aewebsocket%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%e4%bd%95%e3%81%a7%e3%81%99%e3%81%8b%ef%bc%9f\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/php%e3%81%a7%e3%81%aewebsocket%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%e4%bd%95%e3%81%a7%e3%81%99%e3%81%8b%ef%bc%9f\/\",\"name\":\"php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2024-03-15T20:17:33+00:00\",\"dateModified\":\"2025-08-06T00:10:20+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/9ee62cea876d247deba14a0ac7ba5b55\"},\"description\":\"php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/php%e3%81%a7%e3%81%aewebsocket%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%e4%bd%95%e3%81%a7%e3%81%99%e3%81%8b%ef%bc%9f\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/php%e3%81%a7%e3%81%aewebsocket%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%e4%bd%95%e3%81%a7%e3%81%99%e3%81%8b%ef%bc%9f\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/php%e3%81%a7%e3%81%aewebsocket%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%e4%bd%95%e3%81%a7%e3%81%99%e3%81%8b%ef%bc%9f\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/9ee62cea876d247deba14a0ac7ba5b55\",\"name\":\"\u5149, \u660e\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3dffb6c754b95e3fbdcd8973f4375ff9dd10d41e4f6632ad08d4d59ccc35af8d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3dffb6c754b95e3fbdcd8973f4375ff9dd10d41e4f6632ad08d4d59ccc35af8d?s=96&d=mm&r=g\",\"caption\":\"\u5149, \u660e\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/hikariakira\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/php%e3%81%a7%e3%81%aewebsocket%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%e4%bd%95%e3%81%a7%e3%81%99%e3%81%8b%ef%bc%9f\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f - Blog - Silicon Cloud","description":"php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f\/","og_locale":"ja_JP","og_type":"article","og_title":"php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f","og_description":"php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2024-03-15T20:17:33+00:00","article_modified_time":"2025-08-06T00:10:20+00:00","author":"\u5149, \u660e","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u5149, \u660e","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"6\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/php%e3%81%a7%e3%81%aewebsocket%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%e4%bd%95%e3%81%a7%e3%81%99%e3%81%8b%ef%bc%9f\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/php%e3%81%a7%e3%81%aewebsocket%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%e4%bd%95%e3%81%a7%e3%81%99%e3%81%8b%ef%bc%9f\/","name":"php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2024-03-15T20:17:33+00:00","dateModified":"2025-08-06T00:10:20+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/9ee62cea876d247deba14a0ac7ba5b55"},"description":"php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/php%e3%81%a7%e3%81%aewebsocket%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%e4%bd%95%e3%81%a7%e3%81%99%e3%81%8b%ef%bc%9f\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/php%e3%81%a7%e3%81%aewebsocket%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%e4%bd%95%e3%81%a7%e3%81%99%e3%81%8b%ef%bc%9f\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/php%e3%81%a7%e3%81%aewebsocket%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%e4%bd%95%e3%81%a7%e3%81%99%e3%81%8b%ef%bc%9f\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"php\u3067\u306ewebsocket\u306e\u4f7f\u3044\u65b9\u306f\u4f55\u3067\u3059\u304b\uff1f"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/9ee62cea876d247deba14a0ac7ba5b55","name":"\u5149, \u660e","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3dffb6c754b95e3fbdcd8973f4375ff9dd10d41e4f6632ad08d4d59ccc35af8d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3dffb6c754b95e3fbdcd8973f4375ff9dd10d41e4f6632ad08d4d59ccc35af8d?s=96&d=mm&r=g","caption":"\u5149, \u660e"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/hikariakira\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/php%e3%81%a7%e3%81%aewebsocket%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%81%af%e4%bd%95%e3%81%a7%e3%81%99%e3%81%8b%ef%bc%9f\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/16865","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=16865"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/16865\/revisions"}],"predecessor-version":[{"id":92544,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/16865\/revisions\/92544"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=16865"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=16865"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=16865"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}