Created
September 10, 2020 16:45
-
-
Save ivikramsahu/31fdc161898c8b1098e010003a92ca0a to your computer and use it in GitHub Desktop.
Revisions
-
ivikramsahu created this gist
Sep 10, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ <?php $fh = fopen('domain-push-to-ehr.csv','r'); while($line = fgets($fh)){ $string = trim(preg_replace('/\s\s+/', '', $line)); $file = $string."_data.txt"; if (filter_var("$string", FILTER_VALIDATE_IP)) { echo("$string is valid IP") continue; } else { echo("$string is not a valid IP address"); } } fclose($fh); ?>