PHP Interface seregazhuk\PinterestBot\Api\Contracts\HttpClient

Afficher le fichier Open project: seregazhuk/php-pinterest-bot Interface Usage Examples

Méthodes publiques

Méthode 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 méthode

public cookies ( ) : array
Résultat array

execute() public méthode

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

getCookiesPath() public méthode

public getCookiesPath ( ) : string
Résultat string

getCurrentUrl() public méthode

Returns current url after all redirects
public getCurrentUrl ( ) : string
Résultat string

loadCookies() public méthode

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

removeCookies() public méthode

public removeCookies ( ) : seregazhuk\PinterestBot\Api\Contracts\HttpClient
Résultat seregazhuk\PinterestBot\Api\Contracts\HttpClient

setCookiesPath() public méthode

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

setOptions() public méthode

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

useProxy() public méthode

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
Résultat seregazhuk\PinterestBot\Api\Contracts\HttpClient

useSocksProxy() public méthode

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