PHPackages                             yakeing/php\_fsockopen - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. yakeing/php\_fsockopen

AbandonedArchivedSymfony-bundle[HTTP &amp; Networking](/categories/http)

yakeing/php\_fsockopen
======================

fsockopen is the wrapper function for socket socket links

v2.1.0(6y ago)5214010MPL-2.0PHPPHP &gt;=5.6

Since Aug 6Pushed 5y ago1 watchersCompare

[ Source](https://github.com/yakeing/php_fsockopen)[ Packagist](https://packagist.org/packages/yakeing/php_fsockopen)[ Docs](https://github.com/yakeing/php_fsockopen)[ RSS](/packages/yakeing-php-fsockopen/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

fsockopen
=========

[](#fsockopen)

[fsockopen](http://www.php.net/manual/zh/function.fsockopen.php) is socket package function, in addition to the basic commonly used TCP:// communication function, it also has other powerful communication function, UDP:// unix:// udg:// and so on various protocols.

You can use [stream\_get\_transports](http://php.net/manual/zh/function.stream-get-transports.php) to get the current server registered socket transfer protocol list to determine whether to support the need to use the agreement.

### Travis CI badge

[](#travis-ci-badge)

[![Travis-ci](https://camo.githubusercontent.com/bcf5d661456ff9afccde55df525c8db605c61e88a2750dc5ff153614cbeb4aaf/68747470733a2f2f6170692e7472617669732d63692e636f6d2f79616b65696e672f7068705f66736f636b6f70656e2e7376673f6272616e63683d6d61696e)](https://travis-ci.com/yakeing/php_fsockopen)

### codecov badge

[](#codecov-badge)

[![codecov](https://camo.githubusercontent.com/4b19befed5e789fa310d9159f795a22ba68b1d4a11b51f5c2a884d944ab8b699/68747470733a2f2f636f6465636f762e696f2f67682f79616b65696e672f7068705f66736f636b6f70656e2f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/yakeing/php_fsockopen)

### Packagist badge

[](#packagist-badge)

[![Version](https://camo.githubusercontent.com/2d32b604b7cbe828af4579b8a9130c3bd8205fcd849031f403b7f9a5c3f7eb93/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f79616b65696e672f7068705f66736f636b6f70656e2e737667)](../../releases)[![Downloads](https://camo.githubusercontent.com/c0171a09748a1c32f4f864c449cf6cc4a7b46c97187c11e9845e75e9990d599a/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f79616b65696e672f7068705f66736f636b6f70656e2e737667)](https://packagist.org/packages/yakeing/php_fsockopen/stats)

### Github badge

[](#github-badge)

[![Downloads](https://camo.githubusercontent.com/f3d95b78959f5bd270f95d290fd14f083227248f9681b1c4a5a3fa28cecb9453/68747470733a2f2f342e76657263656c2e6170702f6769746875622f646f776e6c6f6164732f79616b65696e672f7068705f66736f636b6f70656e3f69636f6e3d676974687562)](../../)[![Size](https://camo.githubusercontent.com/2691d95acda12b3e370849f9f6d5758ff3ba8e99c40a4ee0eeba5b7a6285327f/68747470733a2f2f342e76657263656c2e6170702f6769746875622f73697a652f79616b65696e672f7068705f66736f636b6f70656e3f69636f6e3d676974687562)](src)[![tag](https://camo.githubusercontent.com/439570b890c41edd5494d54ac130d8c5335fad2ebd0e5c5ace457b90d3fa6a53/68747470733a2f2f342e76657263656c2e6170702f6769746875622f7461672f79616b65696e672f7068705f66736f636b6f70656e3f69636f6e3d676974687562)](../../releases)[![license](https://camo.githubusercontent.com/904c4bcc21898764c7b6b7edfba26ea0d5427757cfaee2837ee7bed32124b40b/68747470733a2f2f342e76657263656c2e6170702f7374617469632f6c6963656e73652f3535352f4d504c2d322e302f6665376433373f69636f6e3d676974687562)](LICENSE)[![languages](https://camo.githubusercontent.com/5275888fd9cd7a7b85d47b803d247819aa953b27342dfa420173152309ab1a18/68747470733a2f2f342e76657263656c2e6170702f7374617469632f6c616e67756167652f3535352f5048502f3334616265663f69636f6e3d676974687562)](../../search?l=php)

### Installation

[](#installation)

Use [Composer](https://getcomposer.org) to install the library. Of course, You can go to [Packagist](https://packagist.org/packages/yakeing/php_fsockopen) to view.

```
    $ composer require yakeing/php_fsockopen

```

### Initialization parameter

[](#initialization-parameter)

- Sample：

```
    $fs = new fsockopen();
    $ret = $fs->init(
        10, //Running time / sec (optional)
        tcp, //transport protocol (optional)
        true //Blocking mode switch (optional)
        );
```

### Get network resources

[](#get-network-resources)

- Sample：

```
    $ret = $fs->GET(
        $Url , //Destination URL
        $Referer , //Forge Referer (optional)
        $Cookie //This Cookie (optional)
    );
```

### POST Submit Form

[](#post-submit-form)

- Sample：

```
    $ret = $fs->POST(
        $Url , //Destination URL
        $Content , //Submit content: key/vvalue&...
        $Referer , //Forge Referer (optional)
        $Cookie, //This Cookie (optional)
        $ContentType //Submission method (optional)
    );
```

### POST File

[](#post-file)

- Sample：

```
    $ret = $fs->PUT(
        $Url , //Destination URL
        $File, //File OR Picture address: ['01.jpg','02.jpg',...]
        $Referer , //Forge Referer (optional)
        $Cookie, //This Cookie (optional)
    );
```

[Sponsor](https://github.com/yakeing/Documentation/blob/master/Sponsor/README.md)
---------------------------------------------------------------------------------

[](#sponsor)

If you've got value from any of the content which I have created, then I would very much appreciate your support by payment donate.

[![Sponsor](https://camo.githubusercontent.com/8bf9004e5f53d2223ce47ceeed603c32154d9e6afa76039dd117bf91c5c1a685/68747470733a2f2f342e76657263656c2e6170702f7374617469632f53706f6e736f722f4541344141413f69636f6e3d6865617274)](https://github.com/yakeing/Documentation/blob/master/Sponsor/README.md)

Author
------

[](#author)

weibo: [yakeing](https://weibo.com/yakeing)

twitter: [yakeing](https://twitter.com/yakeing)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2477d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/95aaf19e492f95c5180360b25e7197ff554625372973f3555b9792a07d5cb9f2?d=identicon)[yakeing](/maintainers/yakeing)

---

Top Contributors

[![yakeing](https://avatars.githubusercontent.com/u/6356091?v=4)](https://github.com/yakeing "yakeing (10 commits)")

---

Tags

fsockopensockettcpudpfsockopenunixtcpudpudg

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yakeing-php-fsockopen/health.svg)

```
[![Health](https://phpackages.com/badges/yakeing-php-fsockopen/health.svg)](https://phpackages.com/packages/yakeing-php-fsockopen)
```

###  Alternatives

[hhxsv5/laravel-s

🚀 LaravelS is an out-of-the-box adapter between Laravel/Lumen and Swoole.

3.9k676.0k10](/packages/hhxsv5-laravel-s)[clue/socket-raw

Simple and lightweight OOP wrapper for PHP's low-level sockets extension (ext-sockets).

35111.1M48](/packages/clue-socket-raw)[rmccue/requests

A HTTP library written in PHP, for human beings.

3.6k34.5M258](/packages/rmccue-requests)[openswoole/core

Openswoole core library

181.1M32](/packages/openswoole-core)[africc/php-epp2

A High Level EPP (Extensible Provisioning Protocol) TCP/SSL Client for PHP

5578.1k2](/packages/africc-php-epp2)[lizhichao/one-ck

clickhouse tcp client

7524.8k4](/packages/lizhichao-one-ck)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
