Counting the first 1000 digits of Pi and Beyond

This code uses to extract Pi digits.

Change the bolded number to change the position of where you wish to grab Pi digits to 1000.

Max digits is 1000.

$url = '';
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
if (curl_errno($ch)) { echo 'Error:' . curl_error($ch); }
$pijson = json_decode($result, true);
$digits = $pijson["content"];