久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <small id='yBBuc'></small><noframes id='yBBuc'>

    <legend id='yBBuc'><style id='yBBuc'><dir id='yBBuc'><q id='yBBuc'></q></dir></style></legend>

    <i id='yBBuc'><tr id='yBBuc'><dt id='yBBuc'><q id='yBBuc'><span id='yBBuc'><b id='yBBuc'><form id='yBBuc'><ins id='yBBuc'></ins><ul id='yBBuc'></ul><sub id='yBBuc'></sub></form><legend id='yBBuc'></legend><bdo id='yBBuc'><pre id='yBBuc'><center id='yBBuc'></center></pre></bdo></b><th id='yBBuc'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='yBBuc'><tfoot id='yBBuc'></tfoot><dl id='yBBuc'><fieldset id='yBBuc'></fieldset></dl></div>
    <tfoot id='yBBuc'></tfoot>

      • <bdo id='yBBuc'></bdo><ul id='yBBuc'></ul>

      1. 來自 php 源的 Socket.io

        Socket.io from php source(來自 php 源的 Socket.io)
          <bdo id='ND9Yx'></bdo><ul id='ND9Yx'></ul>
          1. <tfoot id='ND9Yx'></tfoot>

            <small id='ND9Yx'></small><noframes id='ND9Yx'>

                <legend id='ND9Yx'><style id='ND9Yx'><dir id='ND9Yx'><q id='ND9Yx'></q></dir></style></legend>

                <i id='ND9Yx'><tr id='ND9Yx'><dt id='ND9Yx'><q id='ND9Yx'><span id='ND9Yx'><b id='ND9Yx'><form id='ND9Yx'><ins id='ND9Yx'></ins><ul id='ND9Yx'></ul><sub id='ND9Yx'></sub></form><legend id='ND9Yx'></legend><bdo id='ND9Yx'><pre id='ND9Yx'><center id='ND9Yx'></center></pre></bdo></b><th id='ND9Yx'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ND9Yx'><tfoot id='ND9Yx'></tfoot><dl id='ND9Yx'><fieldset id='ND9Yx'></fieldset></dl></div>

                    <tbody id='ND9Yx'></tbody>
                • 本文介紹了來自 php 源的 Socket.io的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我已經使用 socket.io 開發了一個客戶端-服務器連接,我很高興地說它運行良好.問題來了,因為我需要從 php Source (而不是echo html javascript")創建該連接.像一個

                  I have developed a client-server connection by using socket.io, and i'm happy to say that it works perfectly. The problem comes because I need to create that connection from php Source ( not "echo html javascript" ). Something Like a

                  $socket = socket.createConectionJS;
                  

                  我嘗試了不同的方法,例如:

                  I've tried difrerent ways, such as :

                  • 從服務器執行代碼(使用 spiderMonkey 和 node )
                  • 創建一個 phpSocket 并將其連接到 ServerSocket.j(但顯然格式不同).或...
                  • 最后,我嘗試通過 curl 進行發布,我可以訪問服務器腳本,但無法打開連接

                  我認為解決它的唯一方法是通過使用與 de socket.io 類相同的方式創建套接字來模擬 Web 套接字連接,但在 php 中

                  I'm thinking the only way to resolve it is simulating the web socket connection by creating a socket with the same way as de socket.io class do it but in php

                  任何 socket.io 專家可以幫忙嗎?

                  Anny socket.io expert could help ?

                  謝謝!!_

                  推薦答案

                  是的,我當時就快速了解了一下.我很幸運已經在 PHP 中構建了一個相當先進的網絡抓取庫,所以我只是將來自 TamperData(firefox 插件)的 XML 插入其中,并進行了一些調整.

                  Yeah, I had a quick go at it just then. I'm fortunate to have a fairly advanced web scraping library already built in PHP, so I just plugged the XML from TamperData (firefox plugin), into it, and tweaked a few things.

                  為了模擬 xhr-polling(我的代理不允許 websockets,無論如何這看起來更簡單)...

                  To emulate xhr-polling (my proxy doesn't allow websockets, and this looked simpler anyway)...

                  提出請求:

                  /socket.io/1/?t=1337779479761   
                  

                  (13377...數字只是一個時間戳,使用 time() 生成它).

                  (The 13377... number is just a timestamp, use time() to generate it).

                  應該返回如下內容:

                  682970926640665221:60:60:websocket,htmlfile,xhr-polling,jsonp-polling
                  

                  抓住前面的大數字,那就是您的[CONNECT_ID]",您將在本次會議的剩余時間內保留該號碼.現在做另一個請求:

                  Grab the big number at the front out, that's your "[CONNECT_ID]", which you'll keep for the remainder of the session. Now do another request:

                  /socket.io/1/xhr-polling/[CONNECT_ID]?t=[TIMESTAMP]
                  

                  你會得到類似 ::1 的東西

                  And you'll get back something like ::1

                  就我費心去遵循它而言,這一切看起來都相當基本......沒有特殊的標題或任何偷偷摸摸的東西.建議您使用 TamperData 或數據包嗅探器,并自行遵循.這是我的代碼的輸出:

                  That's about as far as I bothered to follow it, it all looked fairly basic from there... no special headers or anything sneaky. Suggest you use TamperData or a packet sniffer, and just follow it yourself. Here was the output from my code:

                  $ php RealTestCurl.php xml/xhr.xml init1 xhr1 xhr1 xhr1 xhr1
                  
                  xmlFilename: xml/xhr.xml
                  
                  Step: init1
                  Reply: 7638339571841585529:60:60:websocket,htmlfile,xhr-polling,jsonp-polling
                  Found: connect_id: ([0-9]*) - 7638339571841585529
                  
                  Step: xhr1
                  Reply: 1::
                  
                  Step: xhr1
                  Reply: ?46?5:::{"name":"news","args":[{"hello":"world"}]}?63?5:::{"name":"this","args":[{"will":"be received by everyone"}]}
                  
                  Step: xhr1
                  .... there is a massive 20 second timeout here
                  
                  Step: xhr1
                  8::
                  
                  Step: xhr1
                  8::
                  

                  在 node.js/socket.io 一側,運行其首頁上的基本示例:

                  And on the node.js/socket.io side, running on of the basic examples from their front page:

                  debug - client authorized
                  info  - handshake authorized 3445861131360107212
                  debug - setting request GET /socket.io/1/xhr-polling/3445861131360107212?t=1337781185
                  debug - setting poll timeout
                  debug - client authorized for 
                  debug - clearing poll timeout
                  debug - xhr-polling writing 1::
                  debug - set close timeout for client 3445861131360107212
                  debug - websocket writing 5:::{"name":"this","args":[{"will":"be received by everyone"}]}
                  

                  這篇關于來自 php 源的 Socket.io的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)

                      <bdo id='lahn5'></bdo><ul id='lahn5'></ul>
                    • <legend id='lahn5'><style id='lahn5'><dir id='lahn5'><q id='lahn5'></q></dir></style></legend>

                      1. <tfoot id='lahn5'></tfoot>
                          <tbody id='lahn5'></tbody>

                          <small id='lahn5'></small><noframes id='lahn5'>

                          1. <i id='lahn5'><tr id='lahn5'><dt id='lahn5'><q id='lahn5'><span id='lahn5'><b id='lahn5'><form id='lahn5'><ins id='lahn5'></ins><ul id='lahn5'></ul><sub id='lahn5'></sub></form><legend id='lahn5'></legend><bdo id='lahn5'><pre id='lahn5'><center id='lahn5'></center></pre></bdo></b><th id='lahn5'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='lahn5'><tfoot id='lahn5'></tfoot><dl id='lahn5'><fieldset id='lahn5'></fieldset></dl></div>

                            主站蜘蛛池模板: 高清黄色毛片 | 久久精品色欧美aⅴ一区二区 | 日韩精品一区二区三区在线播放 | 成人欧美一区二区三区视频xxx | 国产一级黄色网 | 天天操网| 一个色在线 | 一区二区三区四区在线视频 | 国产专区在线 | 日本久久网 | 在线视频成人 | 国产精品不卡一区二区三区 | 亚洲精品久久国产高清情趣图文 | 亚洲国产精品久久 | 国产日韩在线观看一区 | 午夜午夜精品一区二区三区文 | 久久久久久久av | 日韩欧美精品一区 | 成人婷婷| 欧美日韩专区 | 亚洲日韩中文字幕一区 | 98久久| 91麻豆产精品久久久久久 | 特级做a爰片毛片免费看108 | 日韩欧美一区二区三区 | 亚洲欧美中文日韩在线v日本 | 欧美日韩在线精品 | 亚洲国产精品久久久久婷婷老年 | 亚洲精品福利在线 | 黄色毛片免费看 | 日本三级全黄三级三级三级口周 | 成人免费看片网 | 欧美国产视频 | 亚洲永久 | 雨宫琴音一区二区在线 | 91麻豆精品国产91久久久久久久久 | 天天干夜夜 | 国产免费麻豆视频 | 亚洲成a| 91亚洲国产成人久久精品网站 | 黄色av一区|