Skip to content

Instantly share code, notes, and snippets.

@ko31
Created August 10, 2017 21:53
Show Gist options
  • Save ko31/bac1567bf31e080be3c6e2826bf93ac7 to your computer and use it in GitHub Desktop.
Save ko31/bac1567bf31e080be3c6e2826bf93ac7 to your computer and use it in GitHub Desktop.
WordPressかどうかチェックするphpスクリプト
<?php
$lines = file('url.csv', FILE_IGNORE_NEW_LINES);
$count = 0;
foreach ($lines as $line) {
$val = explode(',', $line);
$html = file_get_contents($val[1]);
if (strpos($html, 'wp-content') !== false) {
echo $val[0] . " is WordPress\n";
$count++;
}
}
echo $count . " counts\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment