Documentation

Socket
in package

Useful methods that help you connect to other hosts using sockets

Tags
author

Reto Kohli reto.kohli@comvation.com

copyright

CLOUDREXX CMS - CLOUDREXX AG

since
2.1.0
subpackage

core

Table of Contents

Properties

$timeout_connect  : mixed
Seconds until the connection attempt times out
$timeout_response  : mixed
Seconds until waiting for a response times out

Methods

getHttp10Response()  : string
Connect to the given URI and return the response

Properties

$timeout_connect

Seconds until the connection attempt times out

private static mixed $timeout_connect = 5

$timeout_response

Seconds until waiting for a response times out

private static mixed $timeout_response = 5

Methods

getHttp10Response()

Connect to the given URI and return the response

public static getHttp10Response(string $uri) : string

The URI should consist of a string like http://my.domain.com:80/path/to?your=resource Where only the host name is mandatory. The defaults for other parts are:

  • Protocol: http
  • Port: 80
  • Path: / Returns false upon the tiniest of errors. Note: Uses HTTP/1.0 ONLY
Parameters
$uri : string

The URI to connect to

Return values
string

The response on success, false otherwise


        
On this page

Search results