Post
Topic
Board Announcements (Altcoins)
Re: 🚀 [ANN] ColossusCoinXT COLX - Coin Swap - Fair Launch, no ICO/ IPO! 🚀 Released
by
pete898
on 16/03/2018, 10:58:18 UTC
Nice to see more apps being made for COLX specific. Have you included all current markets?

Many thanks, it averages https://coinmarketcap.com/currencies/colossuscoinxt/ which includes the current exchange markets with the price here - http://www.presstab.pw/phpexplorer/COLX/index.php

I thought that would give the best mean figure across the board... Just waiting for Apple to approve the listing which usually only takes a couple of days...  (y)

Here's the code that genertates the price -

       $getPrice = file_get_contents("https://api.coinmarketcap.com/v1/ticker/colossuscoinxt/%22);
       $objGetPrice = json_decode($getPrice);

       $content = file_get_contents('http://www.presstab.pw/phpexplorer/COLX/index.php%27);

       $first_step = explode( "class='front'>" , $content );
       $second_step = explode("" , $first_step[1] );
       $string = trim(strip_tags($second_step[0]));
       $start = "Price (USD) per 1,000$";
       $end = "Market Cap";

       $string = ' ' . $string;
       $ini = strpos($string, $start);
       if ($ini == 0) return '';
       $ini += strlen($start);
       $len = strpos($string, $end, $ini) - $ini;
       $usd_price = substr($string, $ini, $len);

       if($objGetPrice[0]->price_usd != '' && $usd_price != '')
       {
           $usd_price=$usd_price/1000;
               echo $final_price = ($objGetPrice[0]->price_usd + $usd_price)/2;
       }
?>

And if you see my earlier post above, it's now live on the iStore...  (y)  

Android version coming up next...

All the best

Pete...