Php Socket com Proxy


Evaluating bids
Description:
Fazer com que esta conexão continue sendo via Socket mas que seja feita por proxy:

public function connect()
    {
        if ($this->isConnected()) {
            return true;
        }


        $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);

        if ($socket !== false) {
            $result = socket_connect($socket, "e" . Rand(1, 16) . (".Whatsapp.n
et"), Constants::PORT);

            if ($result === false) {
                $socket = false;
            }
        }

        if ($socket !== false) {
            socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array("sec" => Constants::TIMEOUT_SEC, "usec" => Constants::TIMEOUT_USEC));
            socket_set_option($socket, SOL_SOCKET, SO_SNDTIMEO, array("sec" => Constants::TIMEOUT_SEC, "usec" => Constants::TIMEOUT_USEC));
            $this->socket = $socket;
            $this->eventManager()->fire("onConnect", array($this->phoneNumber, $this->socket));
            $this->logFile("info", "Connected to WA server");
            return true;
        }
        else {
            $this->logFile("error", "Failed to connect WA server");
            $this->eventManager()->fire("onConnectError", array($this->phoneNumber, $this->socket));
            return false;
        }
    }

Category: IT & Programming
Subcategory: Web development
What is the scope of the project?: Medium-sized change
Is this a project or a position?: Project
I currently have: I have specifications
Required availability: As needed
Roles needed: Developer

PHP

USD 50 - 100

Budget

4

Bids

5

Interested freelancers

Days until project expiration: 22 days

Published: 2 weeks ago

Deadline: Not specified

Create your own project

Are you looking for a freelancer to work on a similar project? Create your own project and you’ll receive proposals from the best freelancers.


Other projects from this client

To find out more about this client

Log in to Workana

Freelancers who already applied to this project

MasterGoDesarrollo, gestión y diseño de páginas web e imagen corporativa. Nuestro equipo está formado por Consultores web, webmasters, profesionales en Diseño Gráfico, Diseño Web, Programación, Bases de Datos, Seguridad en ... More details

Mohan GuptaI am Certified Web developer/Designer having 5 years experience in web development with extensive knowledge in Mobile Application,Android and iOS Development,PHP,WordPress,HTML, PSD, HTML/css, J query, Dhtml, Ajax, X... More details