Wiki ⇒ v10 Developer's manual ⇒ CPG Dragonfly™ CMS
Wiki ⇒ v10 Developer's manual

14: v10 Developer's manual


This wiki section will contain more and more details as the code evolves.

If you can't find what you are looking for, it is probably because one of the following reasons:
- it is still the same as v9, try v9 Developer's Manual
- it is not stable enough to provide durable guidelines
- no one had the time, yet
registered user gains the necessary privileges to create new content or submit changes for approval

Ban or protect an IP

Dragonfly CMS now support IPv4 and IPv6 CIDRs.
To remotely protect or block an IP from your module you will need to use the following:
<?php
# ip_s: "ip start", support IPv4, IPv6, IPv4/CIDR and IPv6/CIDR
# ip_e: "ip end", if you don't use ip_s/CIDR but still want to add an ip range
# type: 0 blocked (default), 8 protected.

# ban 123.123.123.0 - 123.123.123.255
URL::admin('Security&ip_s=123.123.123.123/24');

# ban 123.123.123.0 - 123.123.123.127
URL::admin('Security&ip_s=123.123.123.123&ip_e=123.123.123.127');

# shield 123.123.123.0 - 123.123.123.127
URL::admin('Security&ip_s=123.123.123.123&ip_e=123.123.123.127&type=8');
The produced data will be automatically filled in the "IP's" section, press submit to save changes.

Created: Wednesday, December 07, 2011 (07:39:27) by NanoCaiordo
Updated: Tuesday, July 12, 2016 (23:34:32) by DJ Maze