- Princípios básicos
- Tipos de ameaças
- Tipos de ataques
- Proteção
- Serviços
This file contains hidden or 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
| $recaptcha = new Zend_Service_ReCaptcha('6Ldxo8YSAAAAAD2Q1bc5PCqYA2TPef_wj1JDpmm0','6Ldxo8YSAAAAAOxFKB3hwN1f_3cEaeyMT646RL5X'); | |
| $recaptcha->setOption('theme', 'clean'); | |
| $captcha = new Zend_Form_Element_Captcha('captcha', | |
| array('captcha' => 'ReCaptcha', | |
| 'captchaOptions' => array('captcha' => 'ReCaptcha', | |
| 'service' => $recaptcha))); |
This file contains hidden or 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
| # Install Dependencies | |
| # sudo apt-get install build-essential | |
| # sudo apt-get build-dep php5 | |
| sudo apt-get install libmysqlclient-dev mysql-client libcurl4-openssl-dev libgd2-xpm-dev libjpeg-dev libpng3-dev libxpm-dev libfreetype6-dev libt1-dev libmcrypt-dev libxslt1-dev bzip2 libbz2-dev libxml2-dev libevent-dev libltdl-dev libmagickwand-dev libmagickcore-dev imagemagick libreadline-dev libc-client-dev libsnmp-dev snmpd snmp libvpx-dev libxpm-dev libgmp3-dev libicu-dev libpspell-dev libtidy-dev freetds-dev unixodbc-dev librecode-dev libglib2.0-dev libsasl2-dev libgeoip-dev imagemagick libmagickcore-dev libmagickwand-dev | |
| # Stop Apache | |
| sudo service apache2 stop | |
| # Cleanup Packages | |
| sudo apt-get autoremove |
This file contains hidden or 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 Imprimir(array $values){ | |
| foreach($values as $value){ | |
| echo $value['id'].' - '.$value['label']; | |
| echo '<br />'; | |
| } | |
| } | |
| function Sort_Array(array &$values, $field=NULL){ | |
| if (is_null($field) === false){ | |
| for($i = 0; $i < sizeof($values); $i++){ |
This file contains hidden or 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
| convert(cast(convert(titulo using latin1) as binary) using utf8) |
This file contains hidden or 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
| $key = 'count_news_'.$id; | |
| if(!$this->memcache->get($key)) | |
| $this->memcache->set($key, 0); | |
| $this->memcache->increment($key); |
This file contains hidden or 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
| TIMESTAMPDIFF(unit,datetime_expr1,datetime_expr2) | |
| Returns datetime_expr2 – datetime_expr1, where datetime_expr1 and datetime_expr2 are date or datetime expressions. One expression may be a date and the other a datetime; a date value is treated as a datetime having the time part '00:00:00' where necessary. The unit for the result (an integer) is given by the unit argument. | |
| The unit argument can be: MICROSECOND (microseconds), SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, or YEAR. |
This file contains hidden or 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
| /* | |
| * Translated default messages for the jQuery validation plugin. | |
| * Locale: PT_BR | |
| */ | |
| jQuery.extend(jQuery.validator.messages, { | |
| required: "Este campo é requerido.", | |
| remote: "Por favor, corrija este campo.", | |
| email: "Por favor, forneça um endereço eletrônico válido.", | |
| url: "Por favor, forneça uma URL válida.", | |
| date: "Por favor, forneça uma data válida.", |
This file contains hidden or 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
| http://stackoverflow.com/questions/5401412/zend-form-custom-attribute-in-select-option |
This file contains hidden or 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 | |
| /* | |
| * A mathematical decimal difference between two informed dates | |
| * | |
| * Author: Sergio Abreu | |
| * Website: http://sites.sitesbr.net | |
| * | |
| * Features: | |
| * Automatic conversion on dates informed as string. | |
| * Possibility of absolute values (always +) or relative (-/+) |