Skip to content

Instantly share code, notes, and snippets.

@chanakaDe
Created January 3, 2022 09:00
Show Gist options
  • Save chanakaDe/091e15e8163eb02d02598c076f68fdef to your computer and use it in GitHub Desktop.
Save chanakaDe/091e15e8163eb02d02598c076f68fdef to your computer and use it in GitHub Desktop.
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://prod1.vf-usp.spectrum8.io/vodafone/mobile/contract-summary',
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 =>'{
"address": {
"street": "Ferdinand-Braun-Platz",
"house_no": 1,
"city": "Düsseldorf",
"zipcode": "40549",
"district": "Heerdt"
},
"cart": {
"tariff": {
"id": 19938,
"quantity": 1
},
"promotions": [
{
"id": 20305,
"quantity": 1
},
{
"id": 20334,
"quantity": 1
}
]
}
}',
CURLOPT_HTTPHEADER => array(
'x-usp-vo-id: 40570064',
'x-usp-originator-id: [email protected]',
'Content-Type: application/json',
'Authorization: Bearer eyJraWQiOiIzd0JTbndzMXlwc0xFMFwvb0pjaTNUaWIzaDVFbzVpRTAweXRDbCsydURqdz0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIyaDhqcTJqbnA2NDNydmJnazNsZ2NzYmRuNiIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiaW5mb3NcL3Byb2R1Y3RzIG9yZGVyXC9jb250cmFjdC1zdW1tYXJ5IG9yZGVyXC9kb2N1bWVudHMgYXZhaWxhYmlsaXR5XC9jaGVjayBpbmZvc1wvcG9ydGluZy1pbmZvIG9yZGVyXC9jYW5jZWxsYXRpb24gb3JkZXJcL25ldy1jdXN0b21lciBpbmZvc1wvY291bnRyaWVzIG9yZGVyXC9leGlzdGluZy1jdXN0b21lciBvcmRlclwvc3RhdHVzIHNlcnZpY2VzXC9pbWVpLXJlZ2lzdGVyIG9yZGVyXC9wcm92aWRlci1jaGFuZ2UgcHJlZGVmaW5lZC1vcmRlclwvY29udHJhY3Qtc3VtbWFyeSBwcmVkZWZpbmVkLW9yZGVyXC9uZXctY3VzdG9tZXIgc2VydmljZXNcL2Vwb3MtbGVnYWN5IiwiYXV0aF90aW1lIjoxNjQxMjAwMDY1LCJpc3MiOiJodHRwczpcL1wvY29nbml0by1pZHAuZXUtY2VudHJhbC0xLmFtYXpvbmF3cy5jb21cL2V1LWNlbnRyYWwtMV91RklKQ1VpcnAiLCJleHAiOjE2NDEyMDM2NjUsImlhdCI6MTY0MTIwMDA2NSwidmVyc2lvbiI6MiwianRpIjoiM2FhZmYxYTEtZjI3ZC00OTJkLWFiMjktNjYxY2ZmYTE2NzkxIiwiY2xpZW50X2lkIjoiMmg4anEyam5wNjQzcnZiZ2szbGdjc2JkbjYifQ.ax9sLeMslkTBdMlUM_ISRWTaFoBffnyv_MlH8kdFgo8IARNfzS_wrcXWPgcW4vpz62Dwv7Vi0kHGKUDRTwixarVTw0AmpsCHXl2By1-SiSVAnPwPzfiZ3jMCsPIJWZGR8NxifQZ1sUZElTVndMMeYsHs9lPsD6ZaBDWEwq7MwREwqR9lfqGhP_1AcYkyQRYHc3E9EasH6QssWJ-eubb5GOwr3ieBQEvKdTStkI3QSmatXL3pduIjLUqUI-yGEUTrhRiVW7Gmai4vY3gDeDcGtJy5m4XM_ZoCX5dXf0fP2zI3EU2QW_swQATO9-0phnLNyMaX8ba82jsXHfzqnCdnzw'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment