<?php

$tslaMarket = getMarket("TESLA");
$tslaWidget = "";
$tslaColor = "#fff";
if ($tslaMarket["regularMarketPrice"] != 000) {
    $tslaRegularMarketPrice = $tslaMarket["regularMarketPrice"];
    $tslaRegularMarketChange = floatval($tslaMarket["regularMarketChange"]);

    $marketColor = "#2db47f";
    $arrow = '<span class="fas fa-arrow-circle-right fa-xs market-up"></span>';
    if ($tslaRegularMarketChange < 0) {
        $marketColor = "#ec4e70";
        $arrow = '<span class="market-down fas fa-arrow-circle-right fa-xs"></span>';
    }

    $tslaColor = $marketColor;
    $tslaWidget .= $arrow . " $" . $tslaRegularMarketPrice;
}

$googlMarket = getMarket("GOOGLE");
$googlWidget = "";
$googlColor = "#fff";
if ($googlMarket["regularMarketPrice"] != 000) {
    $googlRegularMarketPrice = $googlMarket["regularMarketPrice"];
    $googlRegularMarketChange = floatval($googlMarket["regularMarketChange"]);

    $marketColor = "#2db47f";
    $arrow = '<span class="fas fa-arrow-circle-right fa-xs market-up"></span>';
    if ($googlRegularMarketChange < 0) {
        $marketColor = "#ec4e70";
        $arrow = '<span class="market-down fas fa-arrow-circle-right fa-xs"></span>';
    }

    $googlColor = $marketColor;
    $googlWidget .= $arrow . " $" . $googlRegularMarketPrice;
}


$aaplMarket = getMarket("AAPLE");
$aaplWidget = "";
$aaplColor = "#fff";
if ($aaplMarket["regularMarketPrice"] != 0) {
    $aaplRegularMarketPrice = $aaplMarket["regularMarketPrice"];
    $aaplRegularMarketChange = floatval($aaplMarket["regularMarketChange"]);

    $marketColor = "#2db47f";
    $arrow = '<span class="fas fa-arrow-circle-right fa-xs market-up"></span>';
    if ($aaplRegularMarketChange < 0) {
        $marketColor = "#ec4e70";
        $arrow = '<span class="market-down fas fa-arrow-circle-right fa-xs"></span>';
    }

    $aaplColor = $marketColor;
    $aaplWidget .= $arrow . " $" . $aaplRegularMarketPrice;
}

function getMarket($symbol) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "https://query2.finance.yahoo.com/v8/finance/chart/".$symbol."?symbol=".$symbol);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_FORBID_REUSE, true);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);
    curl_setopt($ch, CURLOPT_DNS_CACHE_TIMEOUT, 10);
    curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
    $results  = curl_exec($ch);
    curl_close($ch);

    // $regularMarketPrice = 0;
    // $regularMarketChange = 0;
  
    // if ($results) {
    //       echo($results);
    //     $dec_results = json_decode($results, true);
    //     if (array_key_exists('chart', $dec_results)) {
    //         $regularMarketPrice = $dec_results["chart"]["result"][0]["meta"]["regularMarketPrice"];
    //         $previousClose = $dec_results["chart"]["result"][0]["meta"]["previousClose"];
    //         $regularMarketChange = $regularMarketPrice - $previousClose;
    //     }
    // }

    // $response = array(
    //     'regularMarketPrice' => $regularMarketPrice,
    //     'regularMarketChange' => $regularMarketChange
    // );

    // return $response;
    
     $regularMarketPrice = 000;
    $regularMarketChange = 000;
    
    if ($results) {
        $dec_results = json_decode($results, true);

        $regularMarketPrice = $dec_results["quoteResponse"]["result"][0]["regularMarketPrice"];
        $regularMarketChange = $dec_results["quoteResponse"]["result"][0]["regularMarketChange"];
    }

    $response = array(
        'regularMarketPrice' => $regularMarketPrice,
        'regularMarketChange' => $regularMarketChange
    );

    return $response;
}
?>
<!DOCTYPE html>
<html lang="zxx" dir="ltr">

<head>
    <!-- Standard Meta -->
    <title>Rocketta</title>
    <meta name="description" content="World class automated crypto trading bot">
    <meta name="keywords" content="Rocketta, bot, forex, trading, worldclass, crypto">
    <style type="text/css">
    .market-up {
        transform: rotate(-40deg)
    }

    .market-down {
        transform: rotate(40deg)
    }
    </style>
    <?php require_once("header.php"); ?>
    <main>
        <!-- slideshow content begin -->
        <div class="uk-section uk-padding-remove-vertical in-slideshow-gradient">
            <div id="particles-js" class="uk-light in-slideshow uk-background-contain"
                data-src="img/in-equity-decor-1.svg" data-uk-img data-uk-slideshow>
                <hr>
                <ul class="uk-slideshow-items">
                    <li class="uk-flex uk-flex-middle">
                        <div class="uk-container">
                            <div class="uk-grid-large uk-flex-middle" data-uk-grid>
                                <div class="uk-width-1-2@s in-slide-text">

                                    <h1 class="uk-heading-small">World class automated
                                        crypto <span class="in-highlight">trading bot</span>.</h1>
                                    <p class="uk-text-lead">Earn from the comfort of your home. Powerful,
                                        AI powered crypto trading bot
                                        to help you save time, trade 24/7, and automate your
                                        trading.</p>
                                    <div class="uk-grid-medium uk-child-width-1-3@m uk-child-width-1-2@s uk-margin-medium-top uk-visible@s"
                                        data-uk-grid data-market="TSLA,GOOGL,AAPL">
                                        <div>
                                            <div
                                                class="uk-card uk-card-small uk-card-secondary uk-card-body uk-border-rounded uk-flex uk-flex-middle">
                                                <div class="in-symbol-logo">
                                                    <img src="img/in-lazy.gif" data-src="img/in-symbol-tesla.svg"
                                                        alt="ticker" width="28" height="28" data-uk-img>
                                                </div>
                                                <div class="in-price">
                                                    <h6 class="uk-margin-remove">TSLA<span class="uk-text-small"></span>
                                                    </h6>
                                                    <p class="uk-margin-remove"
                                                        style="color:<?php echo ($tslaColor); ?>">
                                                        </span><?php echo($tslaWidget); ?>
                                                    </p>
                                                </div>
                                            </div>
                                        </div>
                                        <div>
                                            <div
                                                class="uk-card uk-card-small uk-card-secondary uk-card-body uk-border-rounded uk-flex uk-flex-middle">
                                                <div class="in-symbol-logo">
                                                    <img src="img/in-lazy.gif" data-src="img/in-symbol-google.svg"
                                                        alt="ticker" width="28" height="28" data-uk-img>
                                                </div>
                                                <div class="in-price">
                                                    <h6 class="uk-margin-remove">GOOGL<span
                                                            class="uk-text-small"></span></h6>
                                                    <p class="uk-margin-remove"
                                                        style="color:<?php echo ($googlColor); ?>">
                                                        </span><?php echo($googlWidget); ?>
                                                    </p>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="uk-visible@m">
                                            <div
                                                class="uk-card uk-card-small uk-card-secondary uk-card-body uk-border-rounded uk-flex uk-flex-middle">
                                                <div class="in-symbol-logo">
                                                    <img src="img/in-lazy.gif" data-src="img/in-symbol-apple.svg"
                                                        alt="ticker" width="28" height="28" data-uk-img>
                                                </div>
                                                <div class="in-price">
                                                    <h6 class="uk-margin-remove">AAPL<span class="uk-text-small"></span>
                                                    </h6>
                                                    <p class="uk-margin-remove"
                                                        style="color:<?php echo ($aaplColor); ?>">
                                                        </span><?php echo($aaplWidget); ?>
                                                    </p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="in-slide-img">
                                    <img src="img/in-lazy.gif" data-src="img/home-mc.png" alt="image-slide" width="620"
                                        height="550" data-uk-img>
                                </div>
                            </div>
                        </div>
                    </li>
                </ul>
                <div class="uk-container">
                    <div class="uk-position-relative" data-uk-grid>
                        <ul class="uk-slideshow-nav uk-dotnav uk-position-bottom-right uk-flex uk-flex-middle"></ul>
                    </div>
                </div>
            </div>
        </div>
        <!-- slideshow content end -->
        <!-- section content begin -->
        <div class="uk-section uk-section-primary uk-preserve-color in-equity-1">
            <div class="uk-container">
                <div class="uk-grid">
                    <div class="uk-width-1-1">
                        <h1 class="white">Automate your trading</h1>
                        <p class="uk-text-lead uk-margin-small-top white">
                            Take your emotion out of the equation
                        </p>
                    </div>
                </div>
                <div class="uk-grid-match uk-grid-medium uk-child-width-1-4@m uk-child-width-1-2@s uk-margin-bottom"
                    data-uk-grid>
                    <div>
                        <div class="uk-card uk-card-body uk-card-default uk-border-rounded">
                            <div class="uk-flex uk-flex-middle">
                                <img src="img/in-lazy.gif" data-src="img/icons/aut-copy.png" alt="award-2"
                                    style="width: 40px; margin-right: 10px;" data-uk-img>
                                <h5 class="uk-margin-remove">Manage your portfolio</h5>
                            </div>
                            <p>Connect all your exchanges accounts and manage them with our trading terminal. Free of
                                charge!</p>
                        </div>
                    </div>
                    <div>
                        <div class="uk-card uk-card-body uk-card-default uk-border-rounded">
                            <div class="uk-flex uk-flex-middle">
                                <img src="img/in-lazy.gif" data-src="img/icons/prt-access.png" alt="award-2"
                                    style="width: 40px;margin-right: 10px;" data-uk-img>
                                <h5 class="uk-margin-remove">Trailing features</h5>
                            </div>
                            <p>Follow the price movement and sell/buy automatically when the price goes in another
                                direction.</p>
                        </div>
                    </div>
                    <div>
                        <div class="uk-card uk-card-body uk-card-default uk-border-rounded">
                            <div class="uk-flex uk-flex-middle">
                                <img src="img/in-lazy.gif" data-src="img/icons/prt-exchange.png" alt="award-2"
                                    style="width: 40px;margin-right: 10px;" data-uk-img>
                                <h5 class="uk-margin-remove">Trading Bots</h5>
                            </div>
                            <p>Copy other traders easily, or trade automatically with our unique trading A.I.
                            </p>
                        </div>
                    </div>
                    <div>
                        <div class="uk-card uk-card-body uk-card-default uk-border-rounded">
                            <div class="uk-flex uk-flex-middle">
                                <img src="img/in-lazy.gif" data-src="img/icons/prt-exchanges.png" alt="award-2"
                                    style="width: 40px;margin-right: 10px;" data-uk-img>
                                <h5 class="uk-margin-remove">Pro Tools</h5>
                            </div>
                            <p>Use tools like DCA, Market-Making, Arbitrage or our own free of charge charting software.
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- section content end -->
        <!-- section content begin -->
        <div class="uk-section in-equity-3 in-offset-top-20">
            <div class="uk-container uk-margin-large-bottom">
                <div class="uk-grid uk-flex uk-flex-middle">
                    <div class="uk-width-expand@m">
                        <h1 class="uk-margin-small-bottom">Social Trading<span class="in-highlight">Platform</span></h1>
                        <h3 class="uk-margin-top uk-text-lead">Join the Social Trading revolution. Subscribe to
                            trading signals, discuss trading
                            strategies on our internal chat, and buy strategies and bot templates from our
                            marketplace. You don't need to be an expert to trade like one.</h3>
                        <hr class="uk-margin-medium-top uk-margin-medium-bottom">
                        <ul class="uk-list in-list-check">
                            <li>Easy</li>
                            <li>Effective</li>
                            <li>Worldclass</li>
                        </ul>
                    </div>
                    <div class="uk-width-2xlarge uk-flex uk-flex-right uk-flex-center@s">
                        <div class="uk-card uk-card-body uk-card-default uk-border-rounded in-margin-top-60@s">
                          <iframe style="width: 100%;" height="380" src="https://www.youtube.com/embed/4jWFhu-KBsE" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- section content end -->
        <!-- section content begin -->
        <div class="uk-section in-equity-4">
            <div class="uk-container uk-margin-top uk-margin-medium-bottom">
                <div class="uk-grid uk-child-width-1-2@m in-testimonial-2" data-uk-grid>
                    <div class="uk-width-1-1@m uk-text-center">
                        <h1>Use expert tools <span class="in-highlight">without</span> coding skills<br /><br /></h1>
                    </div>
                </div>
                <div class="uk-grid-medium uk-child-width-1-2@m" data-uk-grid>
                    <div>
                        <div class="uk-card uk-card-primary uk-card-body uk-border-rounded uk-box-shadow-large uk-background-contain uk-background-center-right"
                            data-src="img/expt-1.png" data-uk-img>
                            <div class="uk-flex uk-flex-middle">
                                <div class="uk-margin-right">
                                    <i class="fas fa-landmark fa-2x"></i>
                                </div>
                                <div>
                                    <h4 class="uk-margin-remove">Dollar Cost Averaging</h4>
                                </div>
                            </div>
                            <p class="uk-margin-top uk-width-3-4">Dollar Cost Averaging allows you to double or triple
                                up on an investment that went
                                sour. By using DCA, you can mitigate any potential bags by bringing down the
                                weighted average price.<br /><br />DON’T WORRY ABOUT
                                BUYING AT THE WRONG
                                MOMENT.<br /><br />
                                Use DCA to invest gradually over time to mitigate risk, or to make up for a loss
                                making position. Buying extra on a loss making position will lower the average
                                buying price.
                            </p>
                        </div>
                    </div>
                    <div>
                        <div class="uk-card uk-card-primary uk-card-body uk-border-rounded uk-box-shadow-large uk-background-contain uk-background-center-right"
                            data-src="img/expt-2.png" data-uk-img>
                            <div class="uk-flex uk-flex-middle">
                                <div class="uk-margin-right">
                                    <i class="fas fa-cogs fa-2x"></i>
                                </div>
                                <div>
                                    <h4 class="uk-margin-remove">Triggers</h4>
                                </div>
                            </div>
                            <p class="uk-margin-top uk-width-3-4">Respond to the rise and fall of coins and make sure
                                that you respond to early signs
                                of bear markets. Create customised actions ranging from notifications to sell
                                orders to ensure your portfolio is safe 24/7.<br /><br />
                                PREPARE AND ADAPT.
                                <br /><br />
                                Set triggers that respond to market conditions. Define what should happen to
                                trigger an action.<br /><br /><br /><br />
                            </p>
                        </div>
                    </div>
                    <div>
                        <div class="uk-card uk-card-primary uk-card-body uk-border-rounded uk-box-shadow-large uk-background-contain uk-background-center-right"
                            data-src="img/expt-3.png" data-uk-img>
                            <div class="uk-flex uk-flex-middle">
                                <div class="uk-margin-right">
                                    <i class="fas fa-users fa-2x"></i>
                                </div>
                                <div>
                                    <h4 class="uk-margin-remove">Short selling</h4>
                                </div>
                            </div>
                            <p class="uk-margin-top uk-width-3-4">Short sell your coins to mitigate a sudden drop. Track
                                your coins to the bottom
                                and only buy them back when they show signs of recovery.
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- section content end -->
        <!-- section content begin -->
        <div class="uk-section in-equity-5">
            <div class="uk-container uk-margin-remove-bottom">
                <div class="uk-grid uk-child-width-1-2@m in-testimonial-2" data-uk-grid>
                    <div class="uk-width-1-1@m uk-text-center">
                        <h1>Experience the leading cryptocurrency trading bot<br /><br /></h1>
                    </div>
                </div>
                <div class="uk-grid uk-child-width-1-3@m uk-child-width-1-2@s" data-uk-grid>
                    <div>
                        <div class="uk-flex uk-flex-left in-award">
                            <div class="uk-margin-small-right">
                                <img src="img/in-lazy.gif" data-src="img/icons/exp-trust.png" alt="award-1" width="91"
                                    height="82" data-uk-img>
                            </div>
                            <div>
                                <h6>Trust</h6>
                                <p class="provider">CryptoRocket works closely together with exchanges and regulators
                                </p>
                            </div>
                        </div>
                    </div>
                    <div>
                        <div class="uk-flex uk-flex-left in-award">
                            <div class="uk-margin-small-right">
                                <img src="img/in-lazy.gif" data-src="img/icons/exp-security.png" alt="award-2"
                                    width="91" height="82" data-uk-img>
                            </div>
                            <div>
                                <h6>Security</h6>
                                <p class="provider">Your account is protected by industry-leading security protocols</p>
                            </div>
                        </div>
                    </div>
                    <div class="">
                        <div class="uk-flex uk-flex-left in-award">
                            <div class="uk-margin-small-right">
                                <img src="img/in-lazy.gif" data-src="img/icons/exp-privacy.png" alt="award-3" width="91"
                                    height="82" data-uk-img>
                            </div>
                            <div>
                                <h6>Privacy</h6>
                                <p class="provider">We will never share your data without your permission.</p>
                            </div>
                        </div>
                    </div>
                </div>
                <br /><br />
            </div>
        </div>
        <!-- section content end -->
        <!-- section content begin -->
        <div class="uk-section uk-section-secondary in-equity-8">
            <div class="uk-container uk-margin-medium-top uk-margin-medium-bottom">
                <div class="uk-grid uk-flex uk-flex-center">
                    <div class="uk-width-3-4@m uk-text-center">
                        <h1>Rocketta</h1>
                        <p class="uk-text-lead uk-margin-medium-bottom">Your exchange is where your funds are located.
                            With Rocketta you can manage all your exchange
                            accounts and trade from one place. </p>
                        <div class="uk-card uk-card-secondary uk-card-body uk-border-rounded uk-box-shadow-large">
                            <div id="tradingview-widget"></div>
                        </div>
                        <p class="uk-text-small uk-text-muted">The pricing is for indicative purposes only. Please go to
                            individual instrument specifications to see the trading conditions.</p>
                        <br /><br /><br />
                    </div>
                </div>
            </div>
        </div>
        <!-- section content end -->
        <!-- section content begin -->
        <div class="uk-section in-equity-11 uk-background-contain uk-background-top-right" data-src="img/affiliate.png"
            data-uk-img>
            <div class="uk-container uk-margin-top uk-margin-bottom">
                <div class="uk-width-3-4@m">
                    <div class="uk-grid-medium uk-grid-match uk-child-width-1-3@m uk-child-width-1-2@s" data-uk-grid>
                        <div class="uk-width-1-1">
                            <h1 class="uk-margin-small-bottom">Earn revenue by joining our <span
                                    class="in-highlight">affiliate program</span></h1>
                            <p class="uk-text-lead uk-margin-remove-top">Find your next trade with access to a wide
                                range of markets.Turn your website/blog/youtube or social media into a passive income
                                powerhouse
                                by promoting worlds leading trading bot! Our affiliate program allows you to make
                                a commission on a monthly basis as long as your customers are active.<br /><br /> Join
                                the
                                fastest growing and most energetic social trading platform.</p>
                        </div>

                    </div>
                </div>
            </div>
        </div>
        <!-- section content end -->
        <!-- section content begin -->
        <div class="uk-section uk-section-primary uk-preserve-color in-equity-6 uk-background-contain uk-background-center"
            data-src="img/in-equity-decor-2.svg" data-uk-img>
            <div class="uk-container uk-margin-small-bottom">
                <div class="uk-grid uk-flex uk-flex-center">
                    <div class="uk-width-2xlarge@m uk-text-center">
                        <h1 class="white">Ready to get started?</h1>
                        <p class="uk-text-lead">Start trading with Rocketta for free!<br /><br />
                            Free to use - no credit card required</p>
                    </div>
                    <div class="uk-width-3-4@m uk-margin-medium-top">
                        <div class="uk-flex uk-flex-center uk-flex-middle button-app">
                            <div>
                                <a href="create-account" class="uk-button uk-button-secondary uk-border-rounded">Open
                                    your account<i class="fas fa-arrow-circle-right uk-margin-small-left"></i></a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="uk-section in-liquid-4 uk-grid-margin uk-first-column">
                        <div class="uk-container">
                            <div class="uk-grid uk-flex uk-flex-middle">
                                <div class="uk-width-1-2@m">
                                    <h4>LIVE NEWS AND UPDATES.</h4>
                                    <p> Learn about all the recent happenings in the crypto market.<br> Access the latest unbiased news, relevant social media updates and information articles to help you gain an understanding of/stay updated on cryptocurrencies
                                        and the Blockchain Technology
                                    </p>
                                </div>
                                <div class="uk-width-1-2@m uk-visible@m">
                                    <a class="uk-button uk-button-text uk-align-right@m" href="#">Show all<i class="fas fa-angle-right uk-margin-small-left"></i></a>
                                </div>
                            </div>

                            <style>
                                .ct-widget__body,
                                .hjsj9o2k,
                                .hjsj9o2k {
                                    max-height: 350px !important;
                                    height: 100% !important;
                                }
                            </style>

                <section class="show-on-mobile" style="padding-top: 0">
                    <div class="container">
                        <script src="https://cointelegraph.com/news-widget" data-ct-widget-limit="35" data-ct-widget-theme="light" data-ct-widget-size="large" data-ct-widget-images="true" data-ct-widget-currency="USD" data-ct-widget-language="en"></script>
                    </div>
                </section>
            </div>
        </div>
        <!-- section content end -->
        <div class="mgm" style="display: none;">
            <div class="txt" style="color:black;">Someone from <b></b> just traded with <a href="javascript:void(0);"
                    onclick="javascript:void(0);"></a></div>
        </div>
    </main>
    <?php require_once("footer.php"); ?>
    </body>

</html>