Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2013
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.78 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Untitled Document</title>
  6. </head>
  7.  
  8. <body>
  9.  
  10. <?php
  11.  $file = fopen("noaa.txt", "r") or exit("Unable to open file!");
  12.  define('ROOT_PATH', dirname(__FILE__));
  13.  //Output a line of the file until the end is reached
  14.  while(!feof($file))
  15.    {
  16.     $pdfs = strip_tags(fgets($file));
  17.    
  18.    
  19.     $pdfs = str_replace("\r\n", "", $pdfs);
  20.     echo($pdfs);
  21.     $path = ROOT_PATH.'/' + $pdfs;
  22.  
  23.     $mill = 'http://www.charts.noaa.gov/PDFs/'.$pdfs;
  24.     $spill = $mill;
  25.     echo ($spill);
  26.     copy($spill, $pdfs);
  27.  
  28.    }
  29.  fclose($file);
  30.  
  31. ?>
  32.  
  33.  
  34.  
  35. </body>
  36. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement