. // // Alexey A.Znayev, znaeff@mail.ru, http://xbsoft.org, http://xbsoft.ru // /////////////////////////////////////////////////////////////////////////// // This file contains public class DNSBL // This class performs IP address check in spam blocking lists as described // on http://ru.wikipedia.org/wiki/RBL class DNSBL { private $_aCheckers = array( // list of checkers available for individual checking 'spamhaus' => array('.zen.spamhaus.org', true), //available for group checking with 'all' key 'spamcop' => array('.bl.spamcop.net', true), //available for group checking with 'all' key 'dsbl' => array('.list.dsbl.org', false), //not available for group checking with 'all' key 'ordb' => array('.relays.ordb.org', false), //not available for group checking with 'all' key 'sorbs' => array('.dnsbl.sorbs.net', false), //not available for group checking with 'all' key 'njabl' => array('.dnsbl.njabl.org', false) //not available for group checking with 'all' key ); // AZ - 1. Key 'all' is illegal // AZ - 2. Most of spammer IP addresses is covered by 'spamhaus' & 'spamcop' (and they are fast), // some of the rest may not work sometimes, you can make them group checking available after individual testing private $_sDefaultChecker = 'spamhaus'; /////////////////////////////////////////////////////////////////////////// // CheckSpamIP - check IP for spam in checkers : given, default or all available for group checking (may be slow) // parameters: // string $ip - ip address // string $checker - checker name or 'all' or nothing // returns: // true when IP exitsts in spam-lists of $checker or at least one of all checkers // false when not or when ip address is local or not correct public function CheckSpamIP($ip, $checker = ''){ if(empty($ip)) return false; if(preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/', $ip) != 1) return false; $octets = explode('.', $ip); if($octets[0] == '127') return false; if($octets[0] == '10') return false; if($octets[0] == '192' && $octets[0] == '168') return false; if($octets[0] == '169' && $octets[0] == '254') return false; // ms windows if((int)$octets[0] > 255 || (int)$octets[1] > 255 || (int)$octets[2] > 255 || (int)$octets[3] > 255 ) return false; $ret_val = false; $PTR = implode(array_reverse($octets), '.'); if($checker === 'all'){ foreach(array_values($this->_aCheckers) as $c){ if($c[1]){ $ret_val = $ret_val || $this->_CheckDNSAnswer(dns_get_record($PTR . $c[0], DNS_A)); } if($ret_val) break; } }else if(array_key_exists($checker, $this->_aCheckers)){ $ret_val = $this->_CheckDNSAnswer(dns_get_record($PTR . $this->_aCheckers[$checker][0], DNS_A)); }else{ $ret_val = $this->_CheckDNSAnswer(dns_get_record($PTR . $this->_aCheckers[$this->_sDefaultChecker][0], DNS_A)); } return $ret_val; } /////////////////////////////////////////////////////////////////////////// // GetCheckers - gets list of available checker names // returns: // array of strings public function GetCheckers(){ return array_keys($this->_aCheckers); } /////////////////////////////////////////////////////////////////////////// // GetGroupCheckers - gets list of checker names available for group checking with 'all' key // returns: // array of strings public function GetGroupCheckers(){ $ret_val = array(); foreach(array_keys($this->_aCheckers) as $k) if($this->_aCheckers[$k][1]) array_push($ret_val, $k); return $ret_val; } /////////////////////////////////////////////////////////////////////////// // GetDefaultChecker - gets default checker name // returns: // string public function GetDefaultChecker(){ return $this->_sDefaultChecker; } /////////////////////////////////////////////////////////////////////////// // SetDefaultChecker - sets default checker name // parameters: // string $new_checker - new default checker name // returns: // true when success // false when failed ($new_checker is not in the list of available checker names) public function SetDefaultChecker($new_checker){ if(array_key_exists($new_checker, $this->_aCheckers)){ $this->_sDefaultChecker = $new_checker; return true; }else{ return false; } } /////////////////////////////////////////////////////////////////////////// // EnableGroupChecking - sets checker available for group checking // parameters: // string $checker - checker name // returns: // true when success ($checker is included) // false when failed ($checker is not in the list of available checker names) public function EnableGroupChecking($checker){ if(array_key_exists($checker, $this->_aCheckers)){ $this->_aCheckers[$checker][1] = true; return true; }else{ return false; } } /////////////////////////////////////////////////////////////////////////// // DisableGroupChecking - sets checker not available for group checking // parameters: // string $checker - checker name // returns: // true when success ($checker is excluded) // false when failed ($checker is not in the list of available checker names) public function DisableGroupChecking($checker){ if(array_key_exists($checker, $this->_aCheckers)){ $this->_aCheckers[$checker][1] = false; return true; }else{ return false; } } // private methods /////////////////////////////////////////////////////////////////////////// // _CheckDNSAnswer - checks DNS-server answer for 127.0.0.* values // returns: // true when success // false when failed private function _CheckDNSAnswer($dns_answer){ if(!is_array($dns_answer)) return false; $len = count($dns_answer); if($len <= 0) return false; for($i=0; $i<$len; $i++){ $obj = $dns_answer[$i]; if(!(is_object($obj) || is_array($obj))) return false; $ip_str = $obj['ip']; if(!is_string($ip_str)) return false; $pos = strpos($ip_str, '127.0.0.'); if($pos !== false) return true; } return false; } } // end of class DNSBL ?> Run Mireya Run !!! https://runmireyarun.com Una viejita con coraje para correr. Fri, 06 Jul 2018 01:47:47 +0000 es hourly 1 https://wordpress.org/?v=6.9.4 Carrera Unicef…en Noviembre https://runmireyarun.com/carrera-unicef-en-noviembre/ https://runmireyarun.com/carrera-unicef-en-noviembre/#respond Mon, 28 Sep 2015 14:39:35 +0000 http://runmireyarun.com/?p=7157

Desde ya preparándome para apoyar los niños del Cauca, La Guajira  el Putumayo

]]>
https://runmireyarun.com/carrera-unicef-en-noviembre/feed/ 0 7157
Carrera de los Héreos 10K – 2015 https://runmireyarun.com/carrera-de-los-hereos-10k-2015/ https://runmireyarun.com/carrera-de-los-hereos-10k-2015/#respond Mon, 20 Apr 2015 21:04:19 +0000 http://runmireyarun.com/?p=6852 Seguir leyendo ]]>

 

#YoCreoEnLosHEROES

El Domingo 19 de Abril se celebraron los 8 años de la Carrera de Los Héreos 10k.

Al principio hubo un poco de desorden, no mucho, pero el recorrido estuvo genial aunque fueron uno poco más de 10 kilómetros corriendo.

 

Para ver las fotos pueden hacer Click AQUÍ.

 

 

 

]]>
https://runmireyarun.com/carrera-de-los-hereos-10k-2015/feed/ 0 6852
Run Tour Avianca – 2015 https://runmireyarun.com/run-tour-avianca-2015/ https://runmireyarun.com/run-tour-avianca-2015/#respond Thu, 26 Mar 2015 12:36:19 +0000 http://runmireyarun.com/?p=6847

 

Ya tenemos en la página las fotos del RunTour Avianca 2015.

Puedes hacer Click AQUÍ para ver las imágenes.

 

 

 

 

]]>
https://runmireyarun.com/run-tour-avianca-2015/feed/ 0 6847
Carrera Verde 2015 https://runmireyarun.com/carrera-verde-2015/ https://runmireyarun.com/carrera-verde-2015/#respond Thu, 12 Mar 2015 21:54:15 +0000 http://runmireyarun.com/?p=6788

 

En su primera edición, hice parte de la siembra de 30.000 árboles!  Ayudando al medio ambiente. ver galería de fotos

 

 

 

 

 

 

]]>
https://runmireyarun.com/carrera-verde-2015/feed/ 0 6788
THE COLOR RUN- 26 DE OCTUBRE 2014 https://runmireyarun.com/the-color-run-26-de-octubre-2014/ https://runmireyarun.com/the-color-run-26-de-octubre-2014/#respond Wed, 29 Oct 2014 12:54:57 +0000 http://runmireyarun.com/?p=6512

ESTA CARRERA ES SOLO DIVERSIÓN, SE PUEDE CORRER O CAMINAR Y EN CADA KILÓMETRO NOS VAN LANZANDO LOS DIFERENTES COLORES…

 

]]>
https://runmireyarun.com/the-color-run-26-de-octubre-2014/feed/ 0 6512
5ª Carrera ALLIANZ 15K 08 de Junio 2014 https://runmireyarun.com/test/ https://runmireyarun.com/test/#respond Wed, 25 Jun 2014 01:14:36 +0000 http://runmireyarun.com/?p=6142 Seguir leyendo ]]>

Esta es la versión de la 5ª Carrera ALLIANZ 15K, cuando miles de atletas participan para prepararse para la Media Maratón de Bogotá (21k).  Partimos desde el parque Contador ubicado en la calle 134 con carrera 9ª y terminamos en el Parque Simón Bolivar.

 

 

 

]]>
https://runmireyarun.com/test/feed/ 0 6142
Carreras 2014 https://runmireyarun.com/carreras-2014/ https://runmireyarun.com/carreras-2014/#respond Tue, 20 May 2014 19:33:41 +0000 http://runmireyarun.com/?p=5952 Seguir leyendo ]]>

Este año ya he participado en cuatro carreras.

RunTour Avianca – 16 de Marzo 2014

Presta tu Pierna – 11 K – 13 de Abril 2014

Carrera de Los Héroes 27 de abril 2014

Gracias a mi amiga Ingrid pude asistir a la

Carrera Fundación El Nogal 10K+1 – 18 de Mayo 2014

 

 

]]>
https://runmireyarun.com/carreras-2014/feed/ 0 5952
Carrera Unicef 2013 https://runmireyarun.com/carrera-unicef-2013/ https://runmireyarun.com/carrera-unicef-2013/#respond Mon, 18 Nov 2013 20:04:42 +0000 http://runmireyarun.com/?p=4621 Seguir leyendo ]]>

El día de ayer participé en los 10K de Unicef apoyando a los niños del Putumayo.

Muy feliz de haber participado. Mi tiempo fue de 59:51.

Para verificar el tiempo, pueden entrar a la siguiente página:  http://finalap.com/race/carrera-atletica-unicef-10k-2013/

FINALAP.COM

La galería de imágenes la pueden ver haciendo click en Carrera 10K Unicef – 2013.

Captura de pantalla 2013-11-17 a la(s) 13.47.11

]]>
https://runmireyarun.com/carrera-unicef-2013/feed/ 0 4621
Run Tour Avianca -2013 https://runmireyarun.com/run-tour-avianca-2013/ https://runmireyarun.com/run-tour-avianca-2013/#respond Sat, 30 Mar 2013 09:25:26 +0000 http://runmireyarun.com/?p=3351

Los  fondos de esta carrera apoyan la realización de las cirugías para niños de escasos recursos que sufren del corazón.Galería fotos las puedes ver en  Run Tour Avianca – 2013.

 

]]>
https://runmireyarun.com/run-tour-avianca-2013/feed/ 0 3351
Carrera Unicef 10K – 2012 https://runmireyarun.com/carrera-unicef-10k-2012/ https://runmireyarun.com/carrera-unicef-10k-2012/#respond Sat, 24 Nov 2012 03:59:12 +0000 http://runmireyarun.com/?p=3304 Seguir leyendo ]]>

Ya subí las fotos de la carrera Unicef 10K del Domingo 18 de noviembre.  Quien desee que envíe a su correo alguna de las fotografías, me dejan un mensaje en la foto que desean y con mucho gusto la envío de inmediato.  A todos los atletas, les deseo éxitos siempre.

 

]]>
https://runmireyarun.com/carrera-unicef-10k-2012/feed/ 0 3304