What is wrong ? $open = fopen("$url", "r"); $read = fread($open, 99000); fclose($open); $read = str_replace("\n",",", $read); $c= explode(",",$read); $cs = sizeof($c); echo "CS:$cs"; Gives CS as CS:306. And only 60 valuable element in the array $c . How can I reduce the array to the valuable elements ?
Might wanna get rid of all the empty lines before exploding into array:
... $read = str_replace("\n",",", $read); // Assuming there's no spaces between commas $read = ereg_replace("[,]+", ",", $read); $c= explode(",",$read); ...
Thanks a lot it seem that is working (for the first blick).
It seems is still not good.