Skip to content

Instantly share code, notes, and snippets.

View syntafin's full-sized avatar

Syntafin syntafin

View GitHub Profile
@syntafin
syntafin / fake-speedtest.php
Created August 16, 2022 14:50 — forked from SoftCreatR/fake-speedtest.php
Generate Fake Stats for speedtest.net
<?php
$down = (!empty($_GET['down']) ? (int)$_GET['down'] : mt_rand(1000, 5000)) * 1000;
$up = (!empty($_GET['up']) ? (int)$_GET['up'] : mt_rand(1000, 5000)) * 1000;
$ping = !empty($_GET['ping']) ? (int)$_GET['ping'] : mt_rand(0, 20);
$server = !empty($_GET['server']) ? (int)$_GET['server'] : 6601; // https://c.speedtest.net/speedtest-servers-static.php
$accuracy = 8;
$headers = [
'POST /api/api.php HTTP/1.1',