tommasov

Untitled

Aug 3rd, 2020 (edited)
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. //Inizializzo vuota
  2. $stringa_output = "";
  3.  
  4. //Leggo il file di testo
  5. $file_ip = file_get_contents('file_che_contiene_gli_ip.txt');
  6.  
  7. //Creo array
  8. $array = explode("\n", $file_ip);
  9.  
  10. foreach ($array as $key => $value) {
  11.  
  12.     $stringa_output .= "http://" . $value . "/index.html" . "<br />";
  13.  
  14. }
  15.  
  16. //$stringa_output contiene il risultato finale, ho aggiunto <br /> per andare a capo se visualizzi nel browser
  17. echo $stringa_output;
Add Comment
Please, Sign In to add comment