Created
November 4, 2017 00:39
-
-
Save mritzmann/522fc0b2dd2dbe25d06ffeb4b397b50a to your computer and use it in GitHub Desktop.
remove netcup db entries
This file contains 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
# more information: | |
# https://github.com/dnszensur/dnszensur-web/issues/47 | |
<?php | |
include '.env'; | |
$db = mysqli_connect("$db_host", "$db_user", "$db_password", "$db_name"); | |
$result = mysqli_query($db, "SELECT domain, autonomous_system FROM domains WHERE autonomous_system LIKE 'AS197540 netcup GmbH'"); | |
while($row = mysqli_fetch_object($result)) | |
{ | |
echo $row->domain; | |
echo "\n"; | |
echo $row->autonomous_system; | |
$new_entry = mysqli_query($db, "UPDATE domains Set country = ' ', autonomous_system = ' ' WHERE domain = '$row->domain'"); | |
} | |
exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment