title: Get IP address in a string
body: <p>I'm looking for some sort of PHP-code to scan my <code>/var/log/secure</code> to filter breakin attempts. Below are just some examples of strings that need to be searched and get the IP address ONLY. I'm using <code>0.0.0.0</code> as an example of an IP address and not the actual IP.</p>
  
  <pre class="lang-none prettyprint-override"><code>Failed password for invalid user admin from 0.0.0.0 port 3108 
  Invalid user ubnt from 0.0.0.0
  pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=0.0.0.0
  </code></pre>