^

Code: 
$randsite = $lesites[rand(0,count($lesites))];
Should be

Code: 
$randsite = $lesites[rand(0,count($lesites)-1)];
And yeah, I started with rand() first but then switched to array_rand because it was shorter.