$siteDescription = '';
$siteKeywords = '';
$siteAuthor = '';
$includeCustomCss = null;
$includeCustomJs = null;
// echo S3STATUS;
if ($userStatus != 'NEWUSER' and $userStatus != 'UNKNOWN' and $userStatus != 'UNSUBSCRIBED') {
    $data['unq_msg_id'] = '';
    $data['AppId'] = $config::STOREID;
    $data['user_id'] = $userId;
    $serviceUrl = S3STATUS;
    // echo  $serviceUrl;
    // exit;
    $curlObj = new Curl\Curl();
    // print_r($data);
    $output = $curlObj->executePostCurl($serviceUrl, $data, 0);
    $output = json_decode($output['Content'], true);
    if (!empty($output)) {
        if ($output['status'] != 'UNSUBSCRIBED') {
            $opr = $output['operator'];
            $cpevent = $output['price_point'];
            if (in_array($opr, $config->allowedOperators)) {
                $current_url = BILLINGHOST . $config->operatorData[$opr]['BillingServiceUnSub'];
                $UnSubData['REQUESTTYPE'] = 'UNSUB';
                $UnSubData['CPEVENT'] = $cpevent;
                $UnSubData['MSISDN'] = $msisdn;
                $UnSubData['OPERATOR'] = $opr;
                $UnSubData['CMODE'] = $config->operatorData[$opr]['Cmode'];
                $UnSubData['UID'] = $config::UID;
                $UnSubData['PASS'] = $config::Paswd;
                $UnSubData['APPCONTID'] = 123;
// }else{
// 	if($_SESSION['downloadAllowed'] == 'false'){
// 		header("Location: index.php");
// 		exit();
// 	}else{
$fileType = $_GET['t'];
$fileName = $_GET['n'];
$cont_reso_type = isset($_GET['r']) ? $_GET['r'] : '0';
$catalogue_detail_id = $_GET['d'];
$content_metadata_id = $_GET['m'];
$cd_name = "";
// $content_metadata_id = 2;
$url = "http://192.168.1.159:9875/v3/contentDownloadHistory/getContentMetaData";
$data = array("cd_cmd_id" => $content_metadata_id);
$data = json_encode($data);
$meta = $curlObj->executePostCurl($url, $data);
$meta = $meta['Content'];
$meta = json_decode($meta);
$downloadingUrl = $meta->message->contentMetaDataDetail->cm_downloading_url;
$url = "http://192.168.1.159:9875/v3/contentDownloadHistory/getCatalogueDetail";
$data = array("cd_cd_id" => $_GET['d']);
$data = json_encode($data);
$cd_name = $curlObj->executePostCurl($url, $data);
$cd_name = $cd_name['Content'];
$cd_name = json_decode($cd_name);
$cd_name = $cd_name->message->catalogueDetail->cd_name;
// print_r($cd_name);
// exit;
// $query_download_path = "select * from content_metadata where cm_id=".$content_metadata_id."";
// $resultVideo = $dbCon->query( $query_download_path);
// //if( $dbCon->getRecordsCount($resultVideo) > 0 ){
Ejemplo n.º 3
0
use Store\Logger;
use Store\Curl;
$curlObj = new Curl\Curl();
$logger = new Logger\Logger();
$fileType = $_GET['t'];
$fileName = $_GET['n'];
$cont_reso_type = isset($_GET['r']) ? $_GET['r'] : '0';
$catalogue_detail_id = $_GET['d'];
$content_metadata_id = $_GET['m'];
// $content_metadata_id = 601;
$cd_name = "";
// $content_metadata_id = 2;
$url = "http://192.168.1.159:9875/v3/contentDownloadHistory/getContentMetaData";
$data = array("cd_cmd_id" => $content_metadata_id);
$data = json_encode($data);
$meta = $curlObj->executePostCurl($url, $data);
$meta = $meta['Content'];
$meta = json_decode($meta);
$downloadingUrl = $meta->message->contentMetaDataDetail->cm_downloading_url;
$url = "http://192.168.1.159:9875/v3/contentDownloadHistory/getCatalogueDetail";
$data = array("cd_cd_id" => $_GET['d']);
$data = json_encode($data);
$cd_details = $curlObj->executePostCurl($url, $data);
$logger->logCurlAPI($cd_details['Info']);
$cd_name = $cd_details['Content'];
$cd_name = json_decode($cd_name);
$cd_name = $cd_name->message->catalogueDetail->cd_name;
//Cloudfront Download Link Start		// Configure the private key
$private_key_filename = '../lib/pk-APKAI6KQIZYCKQ2ZFREA.pem';
$key_pair_id = 'APKAI6KQIZYCKQ2ZFREA';
//Configure the URL of the file