Browsing the archives for the Wordpress category
Подразумевается, что wordpress CMS у вас установленная на вашем виртуальном сервере (VPS/VDS) к которому вы имеете root-доступ.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | #!/usr/bin/perl use POSIX qw/strftime/; $| = 1; $output = `/root/antiddos/parse.sh`; print strftime("%F %T\n", localtime); #print "Netstat Data:\n"; #print $output; open(RD, "/root/antiddos/ban.txt"); while(<rd>){ chomp; $heh{"$_"} = 1; }; close(RD); # debug if (0) { print "Banned list:\n"; for $ip (sort keys %heh) { print $ip."\n"; }; }; print "Do action:\n"; @data = split("\n",$output); foreach $line (@data) { ($num, $ip) = split(" ", $line); if ($heh{"$ip"} == 1) { print "\t$num $ip (already banned)\n"; next; }; print "\t$num $ip\n"; if ($num > 20) { $run_cmd = "/sbin/iptables -A INPUT -s $ip -j DROP"; system($run_cmd); system("echo $ip >> /root/antiddos/ban.txt"); print $run_cmd."\n"; print "$ip banned.\n"; }; }; sleep(1); # ok </rd> |
Continue Reading »
1 | <?php edit_post_link( $link, $before, $after, $id ); ?> |
WP: Function Reference - "edit post link"
Красивая ссылка на редактирование записи в WordPress
1 2 3 | <? wp_footer(); ?> </body> </html> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # anti wp password bruteforce attack RewriteCond %{REQUEST_URI} wp-login.php|wp-admin RewriteCond %{HTTP_USER_AGENT} !^Opera/[0-9.]+ RewriteRule . - [R=404,L] </IfModule> php_value upload_max_filesize 4M # END WordPress |
"Math Comment Spam Protection"
"Simple Trackback Validation"
"ELI's Related Posts Footer Links and Widget"
"WP Sitemap"
"Google XML Sitemaps"
"WP-DB-Backup"
"WP-Twitter Retweet Button"