Developpement, PHP
PHP petite méthode de validation d’email avec test reverse DNS
Une petite méthode plus simple pour vérifier si un email est valide et existe bien par rapport à son nom de domaine: function checkEmail($email) { // First, we check that there’s one @ symbol, // and that the lengths are right. if (!ereg(« ^[^@]{1,64}@[^@]{1,255}$ », $email)) { // Email invalid because wrong number of characters // in one section or wrong number of @ symbols. return false; } // Split it into sections to make life easier $email_array = explode(« @ », $email); $local_array = explode(« . », $email_array[0]); for ($i = 0; $i < sizeof($local_array); $i++) { if (!ereg(« ^(([A-Za-z0-9!#$%&’*+/=?^_`{|}~-][A-Za-z0-9!#$%& ↪’*+/=?^_`{|}~\.-]{0,63})|(\ »[^(\\|\ »)]{0,62}\ »))$ », $local_array[$i])) { return false; } if(!checkdnsrr($email_array[1], »MX »)&& !checkdnsrr($email_array[1], »A »)){ return false; } }
Read MoreDeveloppement, PHP
PHP OVH API changer les DNS de l’IP principale pour le domaine principal et d’un sous domaine
Ce script va cherche les IDs du domaine principal et d’un sous domaine et à partir de ces IDs modifie l’IP cible… Il vous suffit d’indiquer vos informations d’identifications: $AK = « »; $AS = « »; $CK = « »; Et changer « xxx.xxx.xxx.xxx » par la nouvelle IP cible Et changer « nom-de-domaine.com » par votre nom de domaine biensûr ! <?php # Copyright (c) 2013, OVH SAS. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # #* Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. #* Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. #* Neither the name of OVH SAS nor the # names of its contributors may be used to endorse or promote products # derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY OVH SAS AND CONTRIBUTORS « AS IS » AND ANY # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,…
Read More