<?php
$list = file_get_contents('sitelist.txt');
$explode = explode("http://", $list);
$i = 1;
for ($i = 1; $i < count($explode); $i++) {
$filename = 'tost.txt';
$fp = fopen($filename, "a+");
$write = fputs($fp, $explode[$i] . "\n");
fclose($fp);
}
echo "ok";
?>
It’s not write or putting anything in tost.txt. what’s the wrong here ?
I see some issues with your code
All you are tying to do is the the same of this 2 lines
Observation
Sill not sure why you have decided to use the following code
This would
You need to add your
var_dump($list)andexpected outputif you are really going to have a working solution