PHP Interface seregazhuk\PinterestBot\Api\Contracts\HttpClient

Mostrar archivo Open project: seregazhuk/php-pinterest-bot Interface Usage Examples

Public Methods

Method Description
cookie ( $name ) : mixed
cookies ( ) : array
execute ( string $url, string $postString = '', array $headers = [] ) : string Executes curl request.
getCookiesPath ( ) : string
getCurrentUrl ( ) : string Returns current url after all redirects
loadCookies ( string $username = '' ) : seregazhuk\PinterestBot\Api\Contracts\HttpClient Load cookies for specified username
removeCookies ( ) : seregazhuk\PinterestBot\Api\Contracts\HttpClient
setCookiesPath ( string $path ) : seregazhuk\PinterestBot\Api\Contracts\HttpClient Set directory to store all cookie files.
setOptions ( array $options ) : seregazhuk\PinterestBot\Api\Contracts\HttpClient Set custom Curl options to override default
useProxy ( string $host, string $port, string $auth = null, string $type = null ) : seregazhuk\PinterestBot\Api\Contracts\HttpClient
useSocksProxy ( string $host, string $port, null $auth = null ) : seregazhuk\PinterestBot\Api\Contracts\HttpClient

Method Details

cookies() public method

public cookies ( ) : array
return array

execute() public method

Executes curl request.
public execute ( string $url, string $postString = '', array $headers = [] ) : string
$url string
$postString string
$headers array
return string

getCookiesPath() public method

public getCookiesPath ( ) : string
return string

getCurrentUrl() public method

Returns current url after all redirects
public getCurrentUrl ( ) : string
return string

loadCookies() public method

Load cookies for specified username
public loadCookies ( string $username = '' ) : seregazhuk\PinterestBot\Api\Contracts\HttpClient
$username string
return seregazhuk\PinterestBot\Api\Contracts\HttpClient

removeCookies() public method

public removeCookies ( ) : seregazhuk\PinterestBot\Api\Contracts\HttpClient
return seregazhuk\PinterestBot\Api\Contracts\HttpClient

setCookiesPath() public method

Set directory to store all cookie files.
public setCookiesPath ( string $path ) : seregazhuk\PinterestBot\Api\Contracts\HttpClient
$path string
return seregazhuk\PinterestBot\Api\Contracts\HttpClient

setOptions() public method

Set custom Curl options to override default
public setOptions ( array $options ) : seregazhuk\PinterestBot\Api\Contracts\HttpClient
$options array
return seregazhuk\PinterestBot\Api\Contracts\HttpClient

useProxy() public method

public useProxy ( string $host, string $port, string $auth = null, string $type = null ) : seregazhuk\PinterestBot\Api\Contracts\HttpClient
$host string '192.168.1.1'
$port string '12345'
$auth string Authentication string: 'username:password'
$type string HTTP|SOCKS
return seregazhuk\PinterestBot\Api\Contracts\HttpClient

useSocksProxy() public method

public useSocksProxy ( string $host, string $port, null $auth = null ) : seregazhuk\PinterestBot\Api\Contracts\HttpClient
$host string
$port string
$auth null
return seregazhuk\PinterestBot\Api\Contracts\HttpClient