Category : api

I’m trying to call the api inside another api in the foreach loop but the execution time is too long I’ve tried many ways but the same problem This is my code <?php require_once ‘vendor/autoload.php’; $client = new GuzzleHttpClient( [‘headers’ => [‘X-EXEMPLE’ => ’00-00-10′]] ); $res = $client->get(‘https://api.example.com/index.php/records/orders’); $OrdersData = json_decode( $res->getBody(), true ); foreach ..

Read more

Am a new PHP codder on a share hosting services trying to connect my android http_sms_gateway app with REST API but connection always refused $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘http://10.32.31.46:5555/services/api/messaging/?to=131&message=hello’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ ..

Read more