2017 © Pedro Peláez
 

library simplon_request

Simple, straight forward request helper via CURL

image

gesundberg/simplon_request

Simple, straight forward request helper via CURL

  • Saturday, August 5, 2017
  • by Gesundberg
  • Repository
  • 0 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 25 Versions
  • 0 % Grown

The README.md

     _                 _                                              _
 ___(_)_ __ ___  _ __ | | ___  _ __    _ __ ___  __ _ _   _  ___  ___| |_
/ __| | '_ ` _ \| '_ \| |/ _ \| '_ \  | '__/ _ \/ _` | | | |/ _ \/ __| __|
\__ \ | | | | | | |_) | | (_) | | | | | | |  __/ (_| | |_| |  __/\__ \ |_
|___/_|_| |_| |_| .__/|_|\___/|_| |_| |_|  \___|\__, |\__,_|\___||___/\__|
                |_|                                |_|

How to use:, (*1)

$req = new \Simplon\Request\Request();

$response = new \Simplon\Request\RequestResponse();


// set additional headers for request
$req->setRequestHeaders( [
    'User-Agent: Mozilla/5.0', 
    'Accept-Language: en-US,en'
] );    


// set request and response headers log file
// by default log file name -  headers_log.txt  
$req->setLog();                         

$response = $req->get(URL, $data);          // $data - array with variables for GET request


$location = $response->getHeader()->getLocation();  // if redirect

$type = $response->getHeader()->getContentType();   // return type of server response

if($response->getHeader()->isJson()) echo 'IsJson';     // check response type

$charset = $response->getHeader()->getCharset();    // return charset of response when Content-Type: text/html; charset=utf-8

$http_headers = $response->getHeader()->getHttpHeadersArray();
var_dump( $http_headers );              // show array of http headers of response

$html =  $response->getContent();
echo $html;                         // show server response without headers


The Versions

05/08 2017

dev-master

9999999-dev https://github.com/Gesundberg/simplon_request

Simple, straight forward request helper via CURL

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Tino Ehrich
by Andreas Gesundberg

curl auth request jsonrpc post get

05/08 2017

1.1.1

1.1.1.0 https://github.com/Gesundberg/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Tino Ehrich
by Andreas Gesundberg

curl auth request jsonrpc post get

15/12 2015

1.1.0

1.1.0.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Tino Ehrich

curl auth request jsonrpc post get

16/11 2015

1.0.1

1.0.1.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Tino Ehrich

curl auth request jsonrpc post get

26/09 2015

1.0.0

1.0.0.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Tino Ehrich

curl auth request jsonrpc post get

09/09 2015

0.4.0

0.4.0.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Tino Ehrich

curl auth request jsonrpc post get

01/09 2015

0.3.5

0.3.5.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Tino Ehrich

curl auth request jsonrpc post get

30/08 2015

0.3.4

0.3.4.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Tino Ehrich

curl auth request jsonrpc post get

18/08 2015

0.3.3

0.3.3.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Tino Ehrich

curl auth request jsonrpc post get

17/08 2015

0.3.2

0.3.2.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Tino Ehrich

curl auth request jsonrpc post get

17/08 2015

0.3.1

0.3.1.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Tino Ehrich

curl auth request jsonrpc post get

16/04 2015

0.3.0

0.3.0.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Tino Ehrich

curl auth request jsonrpc post get

22/02 2015

0.2.8

0.2.8.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

 

by Tino Ehrich

curl auth request jsonrpc post get

19/02 2015

0.2.7

0.2.7.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

 

by Tino Ehrich

curl auth request jsonrpc post get

19/02 2015

0.2.6

0.2.6.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

 

by Tino Ehrich

curl auth request jsonrpc post get

04/02 2015

0.2.5

0.2.5.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

 

by Tino Ehrich

curl auth request jsonrpc post get

01/02 2015

0.2.4

0.2.4.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

 

by Tino Ehrich

curl auth request jsonrpc post get

17/01 2015

0.2.3

0.2.3.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

 

by Tino Ehrich

curl auth request jsonrpc post get

16/01 2015

0.2.2

0.2.2.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

 

by Tino Ehrich

curl auth request jsonrpc post get

16/01 2015

0.2.1

0.2.1.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

 

by Tino Ehrich

curl auth request jsonrpc post get

16/01 2015

0.2.0

0.2.0.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

 

by Tino Ehrich

curl auth request jsonrpc post get

17/11 2014

0.1.2

0.1.2.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Tino Ehrich

curl auth request jsonrpc post get

15/11 2014

dev-develop

dev-develop https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Tino Ehrich

curl auth request jsonrpc post get

15/11 2014

0.1.1

0.1.1.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Tino Ehrich

curl auth request jsonrpc post get

12/11 2014

0.1.0

0.1.0.0 https://github.com/fightbulc/simplon_request

Simple, straight forward request helper

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Tino Ehrich

curl auth request jsonrpc post get