Created
September 10, 2020 16:45
-
-
Save ivikramsahu/31fdc161898c8b1098e010003a92ca0a to your computer and use it in GitHub Desktop.
A php script for reading file π
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 characters
<?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); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment