title: How to I make php make text on a new line in a text file
body: <p>My current php file looks like</p>
  
  <pre><code>    &lt;?php
  $ip = file_get_contents('https://api.ipify.org');
  echo "Your IP address is: " . $ip;
  file_put_contents ('date.txt'), $ip);
  
  ?&gt;
  </code></pre>
  
  <p>This makes a text file called data.txt and in it has my IP.
  But each time this php files is ran it replaces the ip in txt file
  I would like it to not replace it but instead add a new ip to another line </p>
  
  <p>data.txt (currently)</p>
  
  <pre><code>83.169.130.59 &lt;---- This is what gets replaced 
  </code></pre>
  
  <p>I would like it to make it so it adds another ip underneath the other one like this:</p>
  
  <pre><code>83.169.130.59
  81.214.214.15
  21.251.214.14
  192.125.144.1
  </code></pre>