API for CCQ VINACAPITAL

Table of Contents

API for CCQ VINACAPITAL

http://data.dothanhlong.org/vinacapital/?fundname=VFF

Google Sheet

/html/body/div[1]/div[2]

=IMPORTXML(E25,"/html/body/div[1]/div[2]")*1

image

Source

<?php

// http://data.dothanhlong.org/vinacapital/?fundname=VFF
if(isset($_REQUEST['fundname'])){
    $fundname = $_REQUEST['fundname'];
    // VESAF
    // VEOF
    // VLBF
    // VFF

    $curl = curl_init();

    curl_setopt_array($curl, array(
      CURLOPT_URL => 'https://vinacapital.com/wp-admin/admin-ajax.php',
      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 => array('action' => 'getchartfundnav','fundname' => 'VESAF'),
      CURLOPT_POSTFIELDS => array('action' => 'getchartfundnav','fundname' => $fundname),
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
}

?>

Leave a Reply

Your email address will not be published. Required fields are marked *