OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
3-31-025chanakya
/
assets
/
payment
/
vendor
/
rmccue
/
requests
/
examples
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/26/2025 04:24:36 AM
rwxr-xr-x
📄
basic-auth.php
448 bytes
03/26/2025 04:23:17 AM
rw-r--r--
📄
cookie.php
497 bytes
03/26/2025 04:23:17 AM
rw-r--r--
📄
cookie_jar.php
593 bytes
03/26/2025 04:23:17 AM
rw-r--r--
📄
get.php
387 bytes
03/26/2025 04:23:17 AM
rw-r--r--
📄
multiple.php
1.1 KB
03/26/2025 04:23:17 AM
rw-r--r--
📄
post.php
386 bytes
03/26/2025 04:23:17 AM
rw-r--r--
📄
proxy.php
612 bytes
03/26/2025 04:23:17 AM
rw-r--r--
📄
session.php
644 bytes
03/26/2025 04:23:17 AM
rw-r--r--
📄
timeout.php
518 bytes
03/26/2025 04:23:17 AM
rw-r--r--
Editing: multiple.php
Close
<?php // First, include the Requests Autoloader. require_once dirname(__DIR__) . '/src/Autoload.php'; // Next, make sure Requests can load internal classes. WpOrg\Requests\Autoload::register(); // Setup what we want to request $requests = [ [ 'url' => 'http://httpbin.org/get', 'headers' => ['Accept' => 'application/javascript'], ], 'post' => [ 'url' => 'http://httpbin.org/post', 'data' => ['mydata' => 'something'], ], 'delayed' => [ 'url' => 'http://httpbin.org/delay/10', 'options' => [ 'timeout' => 20, ], ], ]; // Setup a callback function my_callback(&$request, $id) { var_dump($id, $request); } // Tell Requests to use the callback $options = [ 'complete' => 'my_callback', ]; // Send the request! $responses = WpOrg\Requests\Requests::request_multiple($requests, $options); // Note: the response from the above call will be an associative array matching // $requests with the response data, however we've already handled it in // my_callback() anyway! // // If you don't believe me, uncomment this: # var_dump($responses);