StreamBox
FeedbackNemosofts
  • 🏠Welcome
  • Admin Panel
    • Getting Started
    • Database
    • Installation Process
    • SMTP Config
    • themoviedb
  • Android Studio
    • Getting Started
    • Open Project
    • Firebase
    • Push Notification
    • Application ID
    • Verify Purchase Code
    • BASE URL & Encryption Key
    • Change Logo
    • Change Color
    • Change Text
    • App Themes
  • Google Play
    • Release Version
    • Generate Signed Bundle / APK
    • Data Safety Form
    • Advertising ID
  • Login Details Send Intent
  • Custom API
    • Create API Token
    • Custom API URLs
    • PHP Code
  • Troubleshooting
  • App Information Request
  • App Content Permission
  • Rating and Support
  • License
  • FAQ
Powered by GitBook
On this page
  1. Custom API

PHP Code

<?php
function getAPIRequest($dataUrl){
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_URL, $dataUrl);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30); 
    curl_setopt($curl, CURLOPT_TIMEOUT, 30);
    $result = curl_exec($curl);
    curl_close($curl);
    return $result;
}

function createDeviceIDStream(){
    $data = 'https:abc.com/sbox_api.php?token=xxxxxxxxx&action=create&create_type=device_id_stream&username=xxxxxx&password=xxxxxx&dns=https://abc.com&device_id=xxxxxxxxxx';
    $get_data = getAPIRequest($data);
    $response = json_decode($get_data, true);
    return $response;
}

function createDeviceIDXtream(){
    $data = 'https:abc.com/sbox_api.php?token=xxxxxxxxx&action=create&create_type=device_id_xtream&username=xxxxxx&password=xxxxxx&dns=https://abc.com&device_id=xxxxxxxxxx';
    $get_data = getAPIRequest($data);
    $response = json_decode($get_data, true);
    return $response;
}

function createActivationCodeStream(){
    $data = 'https:abc.com/sbox_api.php?token=xxxxxxxxx&action=create&create_type=activation_stream&username=xxxxxx&password=xxxxxx&dns=https://abc.com';
    $get_data = getAPIRequest($data);
    $response = json_decode($get_data, true);
    return $response;
}

function createActivationCodeXtream(){
    $data = 'https:abc.com/sbox_api.php?token=xxxxxxxxx&action=create&create_type=activation_xtream&username=xxxxxx&password=xxxxxx&dns=https://abc.com';
    $get_data = getAPIRequest($data);
    $response = json_decode($get_data, true);
    return $response;
}
PreviousCustom API URLsNextTroubleshooting

Last updated 3 months ago