JavaScript is required to use Bungie.net

服務提示
《天命2》將於明日暫時離線,以進行定期維修。請選取此處查看最新的《天命》伺服器及更新狀態。

#php

原先發佈於:BungieNetPlatform
11/10/2014 1:02:34 PM
1

Here's my replacement for cURL in PHP: WebRequest

Those of you such as myself planning to use [url=https://cloud.google.com/appengine/docs/php/]Googe App Engine with PHP[/url] with the platform would find that Google does not support cURL, which means you're forced to use file_get_contents, fopen, etc... which is incredibly frustrating. There was at least [url=https://github.com/azayarni/purl]one replacement[/url] I found which tried to make any of your existing cURL functions work, but it lacked access to some of the more intricate details I needed. So I went off and wrote my own and thought I'd share it. https://github.com/dazarobbo/WebRequest It's pretty simple to use - I hope. Main points: - Use [url=https://github.com/dazarobbo/WebRequest/blob/master/Web/Session.php]Sessions[/url] to manage cookies. Load and save the session (the cookies) to a file. - Probably shouldn't use it for anything too serious since I haven't tested it all very well yet. - Limited to HTTP 1.0 requests since there's nothing to handle chunked transfers. - Currently no restrictions on cookie sizes/amounts. - Tries to follow RFCs as close as possible - Requires PHP 5.4+ - Fun things with method chaining. - Use however you like. Try it with http://httpbin.org/.
English
#php #curl #GitHub

文章張貼語言:

 

以禮待人。發佈文章前請花點時間查看我們的行為準則 取消 編輯 創立火力戰隊 文章

  • 由xXxStrik3XxX編輯: 11/11/2014 4:12:32 PM
    i used curl with google just fine and with all four.. as far as getting to the login page. simple tweek is all needed... should i post my code here? Of course I may be confused at what your doing, my code is for simple web testing and loging in then obtaining the data.. maybe, cross script if necessary for an "easier" solution?

    文章張貼語言:

     

    以禮待人。發佈文章前請花點時間查看我們的行為準則 取消 編輯 創立火力戰隊 文章

    7 回覆
    你無權檢閱此內容
    ;
    preload icon
    preload icon
    preload icon