Skip to content

fsockopen 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

License

Notifications You must be signed in to change notification settings

marketxing1/php_fsockopen

 
 

Repository files navigation

php_fsockopen

fsockopen 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 to get the current server registered socket transfer protocol list to determine whether to support the need to use the agreement.

Travis CI

Travis-ci

codecov

codecov

Packagist

Version Downloads

Github

Downloads Size tag Language Php

Installation

Use Composer to install the library.


    $ composer require yakeing/php_fsockopen

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

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

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

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

Donate

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.

Bitcoin

1FYbZECgs3V3zRx6P7yAu2nCDXP2DHpwt8

Bitcoin

WeChat

WeChat

Alipay

Alipay

Author

weibo: yakeing

twitter: yakeing

About

fsockopen 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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%