Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
$from = 1;
$to = 300;
$len = 7;
for($i=$from; $i<=$to; $i++) {
//$link = sprintf("site.php?id=%0{$len}s", $i);
$link = "site.php?id=" . str_pad($i, $len, '0', STR_PAD_LEFT);
// file_get_contents($link);
echo $link. PHP_EOL;
}