<?php
$myfile = fopen("../../writable/myfit_session.txt", "r");
$session_token = fgets($myfile);
$member_id = fgets($myfile);
$guid = fgets($myfile);
fclose($myfile);

$sampleAcc = [
    "ses66181+merms6214@gmail.com",
    "ses66181+merms6358@gmail.com",
    "ses66181+merms6357@gmail.com",
    "ses66181+merms7490@gmail.com",
    "ses66181+merms6578@gmail.com",
    "ses66181+merms3966@gmail.com",
    "ses66181+fake001gmail.com",
    "ses66181+merms8439@gmail.com",
    "ses66181+merms3573@gmail.com",
    "ses66181+merms2433@gmail.com",
    "ses66181+merms9389@gmail.com",
    "ses66181+merms4500@gmail.com",
    "ses66181+merms6961@gmail.com",
    "ses66181+merms6917@gmail.com",
    "ses66181+merms2512@gmail.com",
    "ses66181+merms3893@gmail.com",
    "ses66181+merms2553@gmail.com",
    "ses66181+merms1040@gmail.com",
    "ses66181+merms3960@gmail.com",
    "ses66181+merms1842@gmail.com",
    "ses66181+merms2776@gmail.com",
    "ses66181+merms6864@gmail.com",
    "ses66181+merms4092@gmail.com",
    "ses66181+merms8455@gmail.com"];


// Find a randomDate between $start_date and $end_date
function randomDate($start_date, $end_date)
{
    // Convert to timetamps
    $min = strtotime($start_date);
    $max = strtotime($end_date);

    // Generate random number using above bounds
    $val = rand($min, $max);

    // Convert back to desired date format
    return date('Y-m-d H:i:s', $val);
}

function randomDateInRange(DateTime $start, DateTime $end) {
    $randomTimestamp = mt_rand($start->getTimestamp(), $end->getTimestamp());
    $randomDate = new DateTime();
    $randomDate->setTimestamp($randomTimestamp);
    return $randomDate;
}