# JPush API PHP Client With HTTP/2 Support > JPush API PHP Client ÖÜȫ֧³Ö HTTP/2£¬£¬£¬£¬£¬£¬ > **ÒªÇó PHP >= 5.5.24**£¬£¬£¬£¬£¬£¬ > µ«ÓÉÓÚ libcurl ¹ØÓÚ HTTP/2 µÄʵÏÖÒÀÀµÓÚµÚÈý·½¿â [nghttp2](https://github.com/nghttp2/nghttp2) ÒÔÊÇÈôÊÇÒªÖ§³Ö HTTP/2 ÐèÒª×öһЩÆäËûµÄÉèÖᣡ£ ¡£¡£¡£ ### ×°Öà nghttp2 ϵͳÒÀÀµ½öÕë¶Ô Ubuntu 14.04 LTS (trusty) ºÍ Debian 7.0 (wheezy) »òÒÔÉϰ汾£¬£¬£¬£¬£¬£¬ÆäËûϵͳ°æ±¾ÇëÆ¾Ö¤ nghttp2 µÄÎĵµÀ´²Ù×÷: > From Ubuntu 15.10, spdylay has been available as a package named libspdylay-dev. For the earlier Ubuntu release, you need to build it yourself: http://tatsuhiro-t.github.io/spdylay/ ÏêϸÇéÐÎÇëÉó²é [nghttp2 µÄÎĵµ](https://github.com/nghttp2/nghttp2#requirements)¡£¡£ ¡£¡£¡£ ```bash # Get build requirements # Some of these are used for the Python bindings # this package also installs $ sudo apt-get install g++ make binutils autoconf automake autotools-dev libtool pkg-config \ zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev libjansson-dev \ libjemalloc-dev cython python3-dev python-setuptools # Build nghttp2 from source $ git clone https://github.com/tatsuhiro-t/nghttp2.git $ cd nghttp2 $ autoreconf -i $ automake $ autoconf $ ./configure $ make $ sudo make install ``` ### Éý¼¶ curl ÖÁ×îа汾 ```bash $ sudo apt-get build-dep curl # ÇëÆ¾Ö¤Ä¿½ñµÄ curl ¹ÙÍøÖеÄ×îа汾(https://curl.haxx.se/download/)Ìæ»»ÏÂÃæµÄÏìӦλÖà $ wget https://curl.haxx.se/download/curl-7.x.x.tar.bz2 $ tar -xvjf curl-7.x.x.tar.bz2 $ cd curl-7.x.x $ ./configure --with-nghttp2=/usr/local --with-ssl $ make $ sudo make install ``` ### ²âÊÔ ##### ÏÂÁîÐвâÊÔ ÏÂÁîÐÐÔËÐÐ `$ curl --version`£¬£¬£¬£¬£¬£¬ÈôÊä³öÖÐµÄ Features À¸ÖÐÓÐ `HTTP2` Ò»ÏîÔò֤ʵÉèÖÃÀֳɡ£¡£ ¡£¡£¡£ ##### ÑùÀý²âÊÔ ÔËÐÐÑùÀý `$ php examples/devices/get_devices_example.php`£¬£¬£¬£¬£¬£¬ÈôÊä³öÖÐµÄ HTTP °æ±¾ÊÇ HTTP/2 Ôò֤ʵÒѾ­ÔÚʹÓà HTTP2 ·¢ËÍÇëÇóºÍ½ÓÊÜÏìÓ¦ÁË¡£¡£ ¡£¡£¡£ ##### ²âÊÔ²âÊÔ ÔËÐвâÊÔ `$./vendor/bin/phpunit tests/JPush/DevicePayloadTest.php`£¬£¬£¬£¬£¬£¬Èô´òÓ¡³öµÄ http headers ÖÐµÄ HTTP °æ±¾ÊÇ HTTP/2 Ôò֤ʵÒѾ­ÔÚʹÓà HTTP2 ·¢ËÍÇëÇóºÍ½ÓÊÜÏìÓ¦ÁË¡£¡£ ¡£¡£¡£