From Silly Leech, 4 Years ago, written in PHP.
This paste is a reply to LaML Demo from Ken Rice
- go back
Embed
Viewing differences between LaML Demo and Re: LaML Demo
<?php
session_id($_REQUEST['CallSid']);
session_start();

if(!isset($_SESSION['game_on'])){
        error_log("starting game");
        $_SESSION['game_on'] = TRUE;
        $_SESSION['the_number'] = rand(1,6);
        $_SESSION['guess_count'] = 0;
        $_SESSION['guesses'] = array();
        echo '<Response>
                <Say>Welcome to Baby Shark Roulette!</Say>
                <Say>See if you can make it past round 5!</Say>
                <Gather action="https://delta.tollfreegateway.com/cc2020/incoming.php" method="GET" timeout="10" numDigits="1" >
                <Say>Guess a number 1 through 6.</Say>
                </Gather>
                </Response>';

} else {

        error_log("getting a guess");
        $_SESSION['guess_count']++;
        if ($_SESSION['the_number'] == $_REQUEST['Digits']) {
                error_log("You just Lost the game\n");
                lost();

        } elseif (in_array($_REQUEST['Digits'], $_SESSION['guesses'])) {
                error_log("You just Lost for guessing the same number twice\n");
                lost();

        } elseif ( $_SESSION['guess_count'] == 5 ) {
                error_log("Made 5 guesses without dying\n");
                echo '<Response>
                        <Play>https://delta.tollfreegateway.com/cc2020/sounds/gotit.mp3</Play>
                        <Say>You just won by surviving 5 rounds!! </Say>
                        <Say>Have some Happy Music!</Say>
                        <Play loop="5">https://delta.tollfreegateway.com/cc2020/sounds/babyshark.mp3</Play>
                        <Hangup></Hangup>
                        </Response>';
                die();
        }
        $_SESSION['guesses'][] = $_REQUEST['Digits'];
        echo '<Response>
                <Say>You have guessed ';
                echo  $_REQUEST['Digits'];
                echo ' and are safe for now.</Say>
                <Gather action="https://delta.tollfreegateway.com/cc2020/incoming.php" method="GET"  timeout="10" numDigits="1">
                <Say>Guess again.</Say>
                </Gather>
                </Response>';
}

function lost(){
        echo '<Response>
                <Say>Sorry you Have lost.</Say>
                <Play>https://delta.tollfreegateway.com/cc2020/sounds/order66.mp3</Play>
                <Play loop="5">https://delta.tollfreegateway.com/cc2020/sounds/babyshark.mp3</Play>
                <Hangup></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