Last active
March 2, 2023 09:01
-
-
Save webnitros/078eb5c85efe77beae9eceba09731e41 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Created by Andrey Stepanenko. | |
| * User: webnitros | |
| * Date: 02.03.2023 | |
| * Time: 15:22 | |
| */ | |
| $time = microtime(true); | |
| $curl = curl_init(); | |
| curl_setopt_array($curl, array( | |
| CURLOPT_URL => 'http://10.10.30.86:35290/BaseRoznitsa/hs/fandeco/', | |
| #CURLOPT_URL => 'http://93.171.32.202:35290/BaseRoznitsa/hs/fandeco/', | |
| #CURLOPT_URL => 'https://retail.massive.ru/prices', | |
| 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 => '{ | |
| "cache": false, | |
| "vendor_uuid": "ad66b8f8-a535-11e7-812a-005056a9741d", | |
| "currency": "RUB", | |
| "currency_code": 643 | |
| }', | |
| CURLOPT_HTTPHEADER => array( | |
| 'Authorization: Basic d2ViVXNlclJlc3Q6NEc0N3JfMw==', | |
| 'Content-Type: application/json' | |
| ), | |
| )); | |
| $response = curl_exec($curl); | |
| curl_close($curl); | |
| $size = strlen($response); | |
| $time = ((microtime(true) - $time)); | |
| echo "[Novotech] time: {$time} size: {$size}"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment