Custom PHP curl library for the Laravel 5 framework - developed by Ixudra

Overview

ixudra/curl

Latest Version on Packagist license StyleCI Total Downloads

Ixudra Curl

Custom PHP cURL library for the Laravel 4 or 5 framework - developed by Ixudra.

The package provides an easy interface for sending cURL requests from your PHP web application. The package provides an intuitive, fluent interface similar the Laravel query builder to easily configure the request. Additionally, There are several utility methods that allow you to easily add certain options to the request. This makes it easier to create and use cURL requests and also makes your code more comprehensible.

The provided functionality is completely framework-independent but also contains a Laravel service provider for easy integration into your Laravel project.

Note before posting an issue: When posting an issue for the package, always be sure to provide as much information regarding the request as possible. This includes the example cURL request you are trying to transfer into the package syntax, your actual package syntax (the full request) and (if possible) an example URL I can use to test the request myself if need be.

Installation

Pull this package in through Composer.

    {
        "require": {
            "ixudra/curl": "6.*"
        }
    }

or run in terminal: composer require ixudra/curl

Laravel 5.5+ Integration

Laravel's package discovery will take care of integration for you.

Laravel 5.* Integration

Add the service provider to your config/app.php file:

    'providers'     => array(

        //...
        Ixudra\Curl\CurlServiceProvider::class,

    ),

Add the facade to your config/app.php file:

    'aliases'       => array(

        //...
        'Curl'          => Ixudra\Curl\Facades\Curl::class,

    ),

Laravel 4.* Integration

Add the service provider to your app/config/app.php file:

    'providers'     => array(

        //...
        'Ixudra\Curl\CurlServiceProvider',

    ),

Add the facade to your app/config/app.php file:

    'facades'       => array(

        //...
        'Curl'          => 'Ixudra\Curl\Facades\Curl',

    ),

Lumen 5.* integration

In your bootstrap/app.php, make sure you've un-commented the following line (around line 26):

$app->withFacades();

Then, register your class alias:

class_alias('Ixudra\Curl\Facades\Curl', 'Curl');

Finally, you have to register your ServiceProvider (around line 70-80):

/*
|--------------------------------------------------------------------------
| Register Service Providers
|--------------------------------------------------------------------------
|
| Here we will register all of the application's service providers which
| are used to bind services into the container. Service providers are
| totally optional, so you are not required to uncomment this line.
|
*/

// $app->register('App\Providers\AppServiceProvider');

// Package service providers
$app->register(Ixudra\Curl\CurlServiceProvider::class);

Integration without Laravel

Create a new instance of the CurlService where you would like to use the package:

    $curlService = new \Ixudra\Curl\CurlService();

Usage

Laravel usage

The package provides an easy interface for sending cURL requests from your application. The package provides a fluent interface similar the Laravel query builder to easily configure the request. There are several utility methods that allow you to easily add certain options to the request. If no utility method applies, you can also use the general withOption method.

Sending GET requests

In order to send a GET request, you need to use the get() method that is provided by the package:

    use Ixudra\Curl\Facades\Curl;

    // Send a GET request to: http://www.foo.com/bar
    $response = Curl::to('http://www.foo.com/bar')
        ->get();

    // Send a GET request to: http://www.foo.com/bar?foz=baz
    $response = Curl::to('http://www.foo.com/bar')
        ->withData( array( 'foz' => 'baz' ) )
        ->get();

    // Send a GET request to: http://www.foo.com/bar?foz=baz using JSON
    $response = Curl::to('http://www.foo.com/bar')
        ->withData( array( 'foz' => 'baz' ) )
        ->asJson()
        ->get();

Sending POST requests

Post requests work similar to GET requests, but use the post() method instead:

    use Ixudra\Curl\Facades\Curl;

    // Send a POST request to: http://www.foo.com/bar
    $response = Curl::to('http://www.foo.com/bar')
        ->post();
    
    // Send a POST request to: http://www.foo.com/bar
    $response = Curl::to('http://www.foo.com/bar')
        ->withData( array( 'foz' => 'baz' ) )
        ->post();
    
    // Send a POST request to: http://www.foo.com/bar with arguments 'foz' = 'baz' using JSON
    $response = Curl::to('http://www.foo.com/bar')
        ->withData( array( 'foz' => 'baz' ) )
        ->asJson()
        ->post();
    
    // Send a POST request to: http://www.foo.com/bar with arguments 'foz' = 'baz' using JSON and return as associative array
    $response = Curl::to('http://www.foo.com/bar')
        ->withData( array( 'foz' => 'baz' ) )
        ->asJson( true )
        ->post();

Sending PUT requests

Put requests work similar to POST requests, but use the put() method instead:

    use Ixudra\Curl\Facades\Curl;

    // Send a PUT request to: http://www.foo.com/bar/1 with arguments 'foz' = 'baz' using JSON
    $response = Curl::to('http://www.foo.com/bar/1')
       ->withData( array( 'foz' => 'baz' ) )
       ->asJson()
       ->put();

Sending PATCH requests

Patch requests work similar to POST requests, but use the patch() method instead:

    use Ixudra\Curl\Facades\Curl;

    // Send a PATCH request to: http://www.foo.com/bar/1 with arguments 'foz' = 'baz' using JSON
    $response = Curl::to('http://www.foo.com/bar/1')
        ->withData( array( 'foz' => 'baz' ) )
        ->asJson()
        ->patch();

Sending DELETE requests

Delete requests work similar to GET requests, but use the delete() method instead:

    use Ixudra\Curl\Facades\Curl;

    // Send a DELETE request to: http://www.foo.com/bar/1 using JSON
    $response = Curl::to('http://www.foo.com/bar/1')
        ->asJson()
        ->delete();

Sending custom headers

Sending custom headers is easy with the withHeader() method. Multiple calls can be chained together to add multiple headers to the request:

    use Ixudra\Curl\Facades\Curl;

    // Send a GET request to: http://www.foo.com/bar with 2 custom headers
    $response = Curl::to('http://foo.com/bar')
        ->withHeader('MyFirstHeader: 123')
        ->withHeader('MySecondHeader: 456')
        ->get();

Alternatively, you can use the withHeaders() to combine multiple headers into one method call:

    use Ixudra\Curl\Facades\Curl;

    // Send a GET request to: http://www.foo.com/bar with 2 custom headers
    $response = Curl::to('http://foo.com/bar')
        ->withHeaders( array( 'MyFirstHeader: 123', 'MySecondHeader: 456' ) )
        ->get();

You can also use key-value when using the withHeaders() method:

    use Ixudra\Curl\Facades\Curl;

    // Send a GET request to: http://www.foo.com/bar with 2 custom headers
    $response = Curl::to('http://foo.com/bar')
        ->withHeaders( array( 'MyFirstHeader' => '123', 'MySecondHeader' => '456' ) )
        ->get();

For (bearer) authorization headers, you can also use specific utility methods:

withAuthorization('123') ->get(); // Send a GET request to: http://www.foo.com/bar with "Authorization: Bearer 123" header $response = Curl::to('http://foo.com/bar') ->withBearer('123') ->get(); ">
    use Ixudra\Curl\Facades\Curl;

    // Send a GET request to: http://www.foo.com/bar with "Authorization: 123" header
    $response = Curl::to('http://foo.com/bar')
        ->withAuthorization('123')
        ->get();

    // Send a GET request to: http://www.foo.com/bar with "Authorization: Bearer 123" header
    $response = Curl::to('http://foo.com/bar')
        ->withBearer('123')
        ->get();

Note that headers will override each other if you add the same header more than once.

Specifying the content type

Sending custom headers is easy with the withContentType() method. Multiple calls can be chained together to add multiple headers to the request:

    use Ixudra\Curl\Facades\Curl;

    // Send a GET request to: http://www.foo.com/bar with a json content type
    $response = Curl::to('http://foo.com/bar')
        ->withContentType('application/json')
        ->get();

Using proxies

If you need to send your requests via a proxy, you can use the 'withProxy()' method. The method takes five parameters:

  • proxy url (required)
  • port (optional)
  • type of proxy scheme (optional, e.g. http://, https://, ...)
  • username (optional)
  • password (optional)

Optional parameters will be ignored if not filled in.

    use Ixudra\Curl\Facades\Curl;

    // Send a GET request to: http://www.foo.com/bar with a json content type
    $response = Curl::to('http://foo.com/bar')
        ->withProxy('192.168.1.1', 80, 'http://', 'Foo', 'Bar')
        ->get();

Sending files via Curl

For sending files via a POST request, you can use the withFile method to correctly format a request before sending:

    use Ixudra\Curl\Facades\Curl;

    $response = Curl::to('http://foo.com/bar')
        ->withData( array( 'Foo' => 'Bar' ) )
        ->withFile( 'image_1', '/path/to/dir/image1.png', 'image/png', 'imageName1.png' )
        ->withFile( 'image_2', '/path/to/dir/image2.png', 'image/png', 'imageName2.png' )
        ->post();

You can add as many files to the request as you want. A couple of things to keep in mind:

  • When submitting files, the asJson() method and asJsonRequest() method cannot be used. If you do, the files will not be transferred correctly
  • The files are added to the data that was provided in the withData() method using the first parameter of the withFile() method. If this key already exists, it will be overridden.

Downloading files

For downloading a file, you can use the download() method:

    use Ixudra\Curl\Facades\Curl;

    // Download an image from: file http://www.foo.com/bar.png
    $response = Curl::to('http://foo.com/bar.png')
        ->withContentType('image/png')
        ->download('/path/to/dir/image.png');

Using response objects

By default, the package will only return the content of the request. In some cases, it might also be useful to know additional request information, such as the HTTP status code and error messages should they occur. In this case, you can use the returnResponseObject() method, which will return an stdClass that contains additional information as well as the response content:

    use Ixudra\Curl\Facades\Curl;

    // Send a GET request to http://www.foo.com/bar and return a response object with additional information
    $response = Curl::to('http://www.foo.com/bar')
        ->returnResponseObject()
        ->get();
            
    $content = $response->content;

The response object will look like this:

{
   "content": "Message content here",
   "status": 200,
   "contentType": "content-type response header (ex: application/json)",
   "error": "Error message goes here (Only added if an error occurs)"
}

Response headers

In some cases it might be relevant to return the response headers back to the user. This can easily be done using the withResponseHeaders() method.

    use Ixudra\Curl\Facades\Curl;

    // Send a GET request to http://www.foo.com/bar and return a response object with additional information including response headers
    $response = Curl::to('http://www.foo.com/bar')
        ->withResponseHeaders()
        ->returnResponseObject()
        ->get();
            
    $content = $response->content;
    $headers = $response->headers;

The response object will look like this:

{
    "content": "Message content here",
    "status": 200,
    "contentType": "content-type response header (ex: application/json)",
    "error": "Error message goes here (Only added if an error occurs)",
    "headers": {
        "header-type-1": "header-content-1",
        "header-type-2": "header-content-2"
    }
}

It is important to note that the withResponseHeaders() method must be used in conjunction with the returnResponseObject() method in order to see the returned headers

Debugging requests

In case a request fails, it might be useful to get debug the request. In this case, you can use the enableDebug() method. This method uses one parameter, which is the name of the file in which the debug information is to be stored:

    use Ixudra\Curl\Facades\Curl;

    // Send a GET request to http://www.foo.com/bar and log debug information in /path/to/dir/logFile.txt
    $response = Curl::to('http://www.foo.com/bar')
        ->enableDebug('/path/to/dir/logFile.txt')
        ->get();

Using cURL options

You can add various cURL options to the request using of several utility methods such as withHeader() for adding a header to the request, or use the general withOption() method if no utility method applies. The package will automatically prepend the options with the CURLOPT_ prefix. It is worth noting that the package does not perform any validation on the cURL options. Additional information about available cURL options can be found here.

Method Default value Description
withTimeout() 30 seconds Set the timeout of the request (integer or float)
withConnectTimeout() 30 seconds Set the connect timeout of the request (integer or float)
allowRedirect() false Allow the request to be redirected internally
asJsonRequest() false Submit the request data as JSON
asJsonResponse() false Decode the response data from JSON
asJson() false Utility method to set both asJsonRequest() and asJsonResponse() at the same time
withHeader() string Add an HTTP header to the request
withHeaders() array Add multiple HTTP headers to the request
withContentType() none Set the content type of the response
withFile() none Add a file to the form data to be sent
containsFile() false Should be used to submit files through forms
withData() array Add an array of data to sent with the request (GET or POST)
setCookieFile() none Set a file to read cookies from
setCookieJar() none Set a file to store cookies in
withOption() none Generic method to add any cURL option to the request

For specific information regarding parameters and return types, I encourage you to take a look at ixudra\curl\src\Ixudra\Curl\Builder.php. This class has extensive doc blocks that contain all the necessary information for each specific method.

Usage without Laravel

Usage without Laravel is identical to usage described previously. The only difference is that you will not be able to use the facades to access the CurlService.

    $curlService = new \Ixudra\Curl\CurlService();

    // Send a GET request to: http://www.foo.com/bar
    $response = $curlService->to('http://www.foo.com/bar')
        ->get();

    // Send a POST request to: http://www.foo.com/bar
    $response = $curlService->to('http://www.foo.com/bar')
        ->post();

    // Send a PUT request to: http://www.foo.com/bar
    $response = $curlService->to('http://www.foo.com/bar')
        ->put();

    // Send a DELETE request to: http://www.foo.com/bar
    $response = $curlService->to('http://www.foo.com/bar')
        ->delete();

Planning

  • Add additional utility methods for other cURL options
  • Add contract to allow different HTTP providers such as Guzzle

Support

Help me further develop and maintain this package by supporting me via Patreon!!

License

This package is open-sourced software licensed under the MIT license

Contact

For package questions, bug, suggestions and/or feature requests, please use the Github issue system and/or submit a pull request. When submitting an issue, always provide a detailed explanation of your problem, any response or feedback your get, log messages that might be relevant as well as a source code example that demonstrates the problem. If not, I will most likely not be able to help you with your problem. Please review the contribution guidelines before submitting your issue or pull request.

For any other questions, feel free to use the credentials listed below:

Jan Oris (developer)

Comments
  • missing-input-response and missing-input-secret

    missing-input-response and missing-input-secret

            $captcha = Curl::to('https://www.google.com/recaptcha/api/siteverify')
                ->withData(array(
                    'secret' => 'my_secret', 
                    'response' => $recaptcha_response,
                    'remoteip' => $_SERVER['REMOTE_ADDR']
                ))->asJson(true)->post();
    

    I get...

    [error-codes] => Array
            (
                [0] => missing-input-response
                [1] => missing-input-secret
            )
    

    I can get this working using curl-less code... so I am not sure why this seems to not send my post data?

    bug 
    opened by kevinorriss 10
  • Keep getting 400 bad request

    Keep getting 400 bad request

    Hi, using this pack I have 'translated' this:

    $ curl \
     -H 'Authorization: Bearer $TOKEN' \
     -H 'Accept: application/vnd.wit.20160526+json' \
      'https://api.wit.ai/message?q=Bonjour'
    

    to the Pack way like so:

    Curl::to('https://api.wit.ai/message')
            ->withData([
                    'q' => 'Bonjour',
                    'access_token' => 'token',
            ])
            ->asJson()
            ->get();
    

    And it all works fine. But when I try to 'translate':

    $ curl -XPOST 'https://api.wit.ai/converse?v=20160526&session_id=123abc&q=Bonjour' \
          -H "Content-Type: application/json" \
          -H "Accept: application/json" \
          -H 'Authorization: Bearer $TOKEN'
    

    to Curl syntacs like so:

    Curl::to('https://api.wit.ai/converse')
            ->withData([
                    'v' => '20170114',
                    'session_id' => '123abc',
                    'q' => 'Bonjour',
            ])
            ->withContentType('application/json')
            ->withHeaders([
                    'access_token' => 'token',
                ])
            ->asJson()
            ->post();
    

    I get The requested URL returned error: 400 Bad Request.

    Can you please help to represent the above code with this pack. Thank you.

    opened by m7vm7v 9
  • about response header name repeat

    about response header name repeat

    Hi

    I found out about a header returning information containing duplicate name

    Request Code

            $response = Curl::to("http://xxx.com/?do=login")
                ->withHeaders([
                    "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3",
                    "Accept-Language: zh-TW,zh-HK;q=0.9,zh-CN;q=0.8,zh;q=0.7,ja-JP;q=0.6,ja;q=0.5,en-US;q=0.4,en-HK;q=0.3,en;q=0.2,ru;q=0.1,fa;q=0.1,fr;q=0.1",
                    'Cookie: ' . $this->session,
                    'User-Agent: ' . $this->ua,
                    'Referer: http://www.xxx.com/',
                ])
                ->withData([
                    'nick' => "123",
                    'pwd'  => "456",
                    'ft'   => 1,
                    'code' => 7105,
                ])
                ->withResponseHeaders()
                ->returnResponseObject()
                ->post();
            var_dump($response->headers);
    
    

    dump

    array(12) {
       ["Server"]=>
       string(6) "Apache"
       ["Connection"]=>
       string(10) "keep-alive"
       ["Date"]=>
       string(29) "Thu, 12 Sep 2019 02:55:34 GMT"
       ["Cache-Control"]=>
       string(25) "must-revalidate, no-store"
       ["Content-Type"]=>
       string(24) "text/html; charset=UTF-8"
       ["Content-Length"]=>
       string(2) "41"
       ["X-NWS-UUID-VERIFY"]=>
       string(32) "xxxxxxx"
       ["Pragma"]=>
       string(8) "no-cache"
       ["Set-Cookie"]=>
       string(14) "pwd=xxx"
       ["Vary"]=>
       string(10) "User-Agent"
       ["X-Daa-Tunnel"]=>
       string(11) "hop_count=3"
       ["X-NWS-LOG-UUID"]=>
       string(53) "xxx xxx"
       }
    

       

    postman return header

    image

    The correct request returns three Set-Cookies But at this point I can only get a Set-Cookie value, because there can't be duplicate keys in the array. Is there any other way to solve this problem?

    opened by shirakun 7
  • Double request on one function

    Double request on one function

    Hi, I want to make 2 request to https://api.aftership.com/v4/trackings. Let say 1 process I want to use POST method to create tracking data and then I want to use GET method to get tracking data

    OR

    1st I want to get tracking data with number XXX and next with YYY

    I can not use it 2 times if in 1 process. Only 1 of them can produce result. Usually in php native I open and Close curl to do that. What's a problem? Maybe you can use easy language because I'm still learning :D

    opened by shadowgroundz 7
  • Return Null

    Return Null

    I'm trying to post in a local web service using this code

    $params = array( 'config' => array(
                'format' => 'normal',
                'layout' => 'TOP'),
                'boletos' => array(
                    array(
                    'valor' => '15,00',
                    'vencimento' => '10/01/2018',
                    'banco' => '237',
                    'agencia' => '123',
                    'codBeneficiario' => '4567',
                    'carteira'=>'09',
                    'nossoNumero' => '25897'
                ))
            );
    
    $response = Curl::to('http://localhost:9999/v1/boleto/')
                    ->withData($params)
                    ->asJson()
                    ->enableDebug('../public/boletos/logFile.txt')
                    ->post();
    

    but the response is returning null, in the log file return this:

    *   Trying ::1...
    * Connected to localhost (::1) port 9999 (#0)
    > POST /v1/boleto/ HTTP/1.1
    Host: localhost:9999
    Accept: */*
    Content-Type: application/json
    Content-Length: 193
    
    * upload completely sent off: 193 out of 193 bytes
    < HTTP/1.1 200 OK
    < Access-Control-Allow-Origin: *
    < Server: BoletoDireto-4.1.6.R1 (10/11/2017)
    < Content-Type: application/pdf
    < Content-Length: 4681
    < 
    * Connection #0 to host localhost left intact
    

    should return something like a pdf. What am I doing wrong?

    using postman works perfectly

    thanks in advance.

    opened by risidan 6
  • Undefined function Ixudra\Curl\curl_init()

    Undefined function Ixudra\Curl\curl_init()

    Error occurred while using,

    // Send a POST request to: http://www.foo.com/bar?foz=baz with arguments 'fow' = 'baw' using JSON Curl::post('http://www.foo.com/bar', array('foz' => 'baz'), array('fow' => 'baw'), true);

    Error: FatalErrorException in Curl.php line 23: Call to undefined function Ixudra\Curl\curl_init()

    opened by nidhi95 6
  • undefined method Curl::to()

    undefined method Curl::to()

    Hi there,

    I use this code : Curl::to($this->path)->get();

    I get this error in production (not in local) Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR) Call to undefined method Ixudra\Curl\Facades\Curl::to()

    I use Laravel 5.6 composer.json : "ixudra/curl" : "^6.16",

    Thanks. Have a nice day.

    opened by brunolavergne 5
  • Feature Request: Xdebug param support

    Feature Request: Xdebug param support

    Feature reuest.

    I found my self extending the libray in my app just to add XDEBUG_SESSION_START param to the URL. I'd be nice to be added automatically by a env param or a second arg to the "to" method.

    What I'm doing is to use the APP_DEBUG default env param to know when to add the XDEBUG param and if I need a value for that param then I use a seconds custom env variable to do so.

    enhancement 
    opened by nahuelhds 5
  • Authentication credentials were not provided

    Authentication credentials were not provided

    i m using laravel 5.4 and following all the instruction in this package , but i did not found any place where i have to enter Authentication credentials. i m getting this error when hitting the target link by ixudra/curl "Authentication credentials were not provided"

    opened by RamizMurtaza 5
  • Enable File Sending.

    Enable File Sending.

    Hi, Responding to the issue: https://github.com/ixudra/curl/issues/13

    I needed this functionality this morning and saw that this feature was not available yet and i figure some one else may need it. I tried following the original plugin format to make the feature seem less. Updated README.md to reflect the new feature.

    I tested this internally and it seems to be working fine.

    Thanks

    opened by Thedigit 5
  • How to use Curl if url have redirect ?

    How to use Curl if url have redirect ?

    $inv = Curl::to('https://steamcommunity.com/profiles/76561198015712695/inventory/json/730/2/')
    ->get();
    

    this code dont wort because redirect help pls

    opened by valeriy-efimov 5
  • CURLOPT_HTTP_VERSION not working

    CURLOPT_HTTP_VERSION not working

    Dear, I tried to use

    ->withOption('HTTP_VERSION', CURL_HTTP_VERSION_1_1) or ->withOption('HTTP_VERSION', 'CURL_HTTP_VERSION_1_1')

    But seem it no effect. I tried with normal curl it work perfect.

    opened by nguyenduytan 1
  • How to Curl (ContentType: multipart/form-data) to API without file data?

    How to Curl (ContentType: multipart/form-data) to API without file data?

        $jsonField = [
            'user_id'       => 'userid',
            'document_id'   => 'documentid', 
        ];
        $jsonFile = ['JSONFile' => $jsonField];
    
        $output = Curl::to('$url')
            ->withHeader('Authorization:Bearer ' . $token)
            ->withContentType('multipart/form-data')
            ->withData([
                'jsonfield'     => json_encode($jsonFile)
            ])->asJsonResponse()
            ->post();
    

    Hi, I have been trying to send request to API server, it requires multipart field as its ContentType. But when i checked with the API provider, they said that the json data is not been received in their server, only the header. I have used this method for other API request that they have and it works well. The only difference is that the other have file upload and this one doesn't. Does anyone have experienced this? Any solution / help will be appreciated. Thanks!

    opened by kelvins19 2
  • Send text files as raw data

    Send text files as raw data

    For example I want to send Text file:

    $response = Curl::to( "http://url". "?".http_build_query($data) )
        ->withContentType('text/plain')
        ->withOption('POSTFIELDS', 'this is raw data')
        ->enableDebug(public_path().'/logFile.txt')
        ->post();
    

    Here everything goes well except POSTFIELDS because it is rewritten. Just in row 405 in Builder.php it can be accomplished by:

    $this->curlOptions[ 'POSTFIELDS' ] = isset($this->curlOptions[ 'POSTFIELDS' ]) ? $this->curlOptions[ 'POSTFIELDS' ] : $parameters;
    
    enhancement 
    opened by elimentz 0
Owner
Jan Oris
Jan Oris
The best php curl library.

中文文档 About Implemented by using php-curl internal io event with high performance,high universality,high extensibility which especially suitable for ma

Ares 431 Dec 12, 2022
This library provides an object-oriented wrapper of the PHP cURL extension

PHP Curl Class This library provides an object-oriented wrapper of the PHP cURL extension. If you have questions or problems with installation or usag

PHP MOD 321 Dec 30, 2022
The best php curl library.

中文文档 About Implemented by using php-curl internal io event with high performance,high universality,high extensibility which especially suitable for ma

Ares 431 Dec 12, 2022
PHP Curl ile letgo api kütüphanesi oluşturuldu. php ile letgo giriş yap.

Kendi LETGO API ile işlemler gerçekleştirelim. // email işlemleri $server = 'imap.gmail.com'; $user = '[email protected]'; $pass = 'password'; $port = 9

Görkem Bayraktar 2 Nov 3, 2022
Online tool to convert `curl` requests to Laravel `Http` requests

curl Converter Another bit of automation from Shift to convert curl requests to Laravel Http requests. This project is a WIP. You may follow along wit

Laravel Shift 66 Dec 17, 2022
A Chainable, REST Friendly, PHP HTTP Client. A sane alternative to cURL.

Httpful Httpful is a simple Http Client library for PHP 7.2+. There is an emphasis of readability, simplicity, and flexibility – basically provide the

Nate Good 1.7k Dec 21, 2022
PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs

PHP Curl Class: HTTP requests made easy PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs. Installation Requirements Quic

null 3.1k Jan 5, 2023
PHP cURL for feed Instagram Graph API

php-curl-instagram-graph PHP cURL for feed Instagram Graph API Script made based on the new (2020) Instagram API that requires authorization token gen

null 12 Apr 13, 2022
Simple PHP curl wrapper class

php-curl The smallest possible OOP wrapper for PHP's curl capabilities. Note that this is not meant as a high-level abstraction. You should still know

Andreas Lutro 243 Dec 5, 2022
Simple HTTP cURL client for PHP 7.1+ based on PSR-18

Simple HTTP cURL client for PHP 7.1+ based on PSR-18 Installation composer require sunrise/http-client-curl QuickStart composer require sunrise/http-f

Sunrise // PHP 15 Sep 5, 2022
Plug & Play [CURL + Composer Optional], Proxy as a Service, Multi-tenant, Multi-Threaded, with Cache & Article Spinner

?? .yxorP The SAAS(y), Multitenancy & Augmenting Web Proxy Guzzler is a 100% SAAS(y) plug-and-play (PHP CURL+Composer are Optional) solution that leverages SAAS architecture to provide multi-tenancy, multiple threads, caching, and an article spinner service.

4D/ҵ.com Dashboards 12 Nov 17, 2022
↪️ Bypass for PHP creates a custom HTTP Server to return predefined responses to client requests

Bypass for PHP provides a quick way to create a custom HTTP Server to return predefined responses to client requests.Useful for tests with Pest PHP or PHPUnit.

CiaReis 101 Dec 1, 2022
🐼 Framework agnostic package using asynchronous HTTP requests and PHP generators to load paginated items of JSON APIs into Laravel lazy collections.

Framework agnostic package using asynchronous HTTP requests and generators to load paginated items of JSON APIs into Laravel lazy collections.

Andrea Marco Sartori 61 Dec 3, 2022
Requests for PHP is a humble HTTP request library. It simplifies how you interact with other sites and takes away all your worries.

Requests for PHP Requests is a HTTP library written in PHP, for human beings. It is roughly based on the API from the excellent Requests Python librar

null 3.5k Dec 31, 2022
Requests for PHP is a humble HTTP request library. It simplifies how you interact with other sites and takes away all your worries.

Requests for PHP Requests is a HTTP library written in PHP, for human beings. It is roughly based on the API from the excellent Requests Python librar

null 3.5k Dec 31, 2022
Unirest in PHP: Simplified, lightweight HTTP client library.

Unirest for PHP Unirest is a set of lightweight HTTP libraries available in multiple languages, built and maintained by Mashape, who also maintain the

Kong 1.3k Dec 28, 2022
PHP Secure Communications Library

phpseclib - PHP Secure Communications Library Supporting phpseclib Become a backer or sponsor on Patreon One-time donation via PayPal or crypto-curren

null 4.9k Jan 3, 2023
A modern PHP library that allows you to make resilient calls to external services

Resiliency, an implementation for resilient and modern PHP applications Main principles This library is compatible with PHP 7.4+. Installation compose

We love open source softwares 77 Dec 12, 2022
Requests - a HTTP library written in PHP, for human beings

Requests is a HTTP library written in PHP, for human beings. It is roughly based on the API from the excellent Requests Python library. Requests is ISC Licensed (similar to the new BSD license) and has no dependencies, except for PHP 5.6+.

WordPress 3.5k Jan 6, 2023