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
<?php | |
#Requires PHP 5.3.0 | |
define("CONSUMER_KEY", "consumer_key"); | |
define("CONSUMER_SECRET", "consumer_secret"); | |
define("OAUTH_TOKEN", "access_token"); | |
define("OAUTH_SECRET", "access_secret"); | |
function oauth_gen($method, $url, $iparams, &$headers) { |
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
function codiceFISCALE(cfins) | |
{ | |
var cf = cfins.toUpperCase(); | |
var cfReg = /^[A-Z]{6}\d{2}[A-Z]\d{2}[A-Z]\d{3}[A-Z]$/; | |
if (!cfReg.test(cf)) | |
{ | |
return false; | |
} | |
var set1 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; |
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
function isEmail(email) { | |
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; | |
if(reg.test(email) == false) { | |
return false; | |
} | |
else | |
{ | |
return true; | |
} | |
} |
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
<? | |
function generatePassword($length=9, $strength=0) { | |
$vowels = 'aeuy'; | |
$consonants = 'bdghjmnpqrstvz'; | |
if ($strength & 1) { | |
$consonants .= 'BDGHJLMNPQRSTVWXZ'; | |
} | |
if ($strength & 2) { | |
$vowels .= "AEUY"; | |
} |
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
CREATE TABLE IF NOT EXISTS `stati` ( | |
`id_stati` int(16) NOT NULL auto_increment, | |
`sigla_stati` varchar(5) default NULL, | |
`nome__stati` varchar(128) default NULL, | |
PRIMARY KEY (`id_stati`), | |
KEY `PRIMARY_KEY` (`id_stati`) | |
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; | |
INSERT INTO `stati` (`id_stati`, `sigla_stati`, `nome__stati`) VALUES | |
(1, 'AF', 'Afghanistan'), |
NewerOlder