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 | |
$year = 1600; | |
$dBy4 = gmp_div_r($year, 4); | |
$answer = 'Not a Leap year'; | |
if($dBy4 == 0) { | |
$dBy100 = gmp_div_r($year, 100); | |
$dBy400 = gmp_div_r($year, 400); | |
if($dBy100 == 0 && $dBy400 == 0) { | |
$answer = $year.' is a leap 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
<?php | |
function textPrepare ($input) | |
{ | |
//clear tags, convert chars to html units, | |
$input=strip_tags($input, '<br>'); //$input=strip_tags($input, '<br>'); | |
$input=strtolower($input); | |
$input=htmlentities($input); | |
return $input; | |
}; | |
$text="This is the @ world we created! 1-2+3"; |
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 | |
$json = '{ | |
"products": [{ | |
"apr": 3.984, | |
"armIndex": "", | |
"closingCost": 2584.0, | |
"lastUpdate": "2017-11-06T08:27:05.607", | |
"loanTerm": "30 Yr", | |
"lockPeriod": 30, |
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
<style> | |
table { | |
border-collapse: collapse; | |
} | |
table,th,td { | |
border: 1px solid black; | |
} | |
</style> | |
<?php |
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 | |
$key = 2;//(int)rand(1,3); | |
function encode($str,$k) | |
{ | |
$newstring = ''; | |
foreach(range(0,strlen($str)-1) as $i) | |
{ | |
$newstring .= chr(ord($str[$i])+$k); |
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 | |
$curl = curl_init(); | |
curl_setopt_array($curl, array( | |
CURLOPT_URL => "https://api.shopvox.com/v1/login", | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_ENCODING => "", | |
CURLOPT_MAXREDIRS => 10, | |
CURLOPT_TIMEOUT => 30, |
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
<!-- Para darle estilo a nuestros resultados en pantalla --> | |
<style> | |
table { | |
border-collapse: collapse; | |
} | |
table,th,td { | |
border: 1px solid black; | |
} | |
</style> |
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 | |
$language_detect = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); | |
if($language_detect == "it") {$lang_det = "it";} // italiano | |
elseif($language_detect == "en") {$lang_det = "en";} // inglese | |
elseif($language_detect == "de") {$lang_det = "de";} // tedesco | |
elseif($language_detect == "es") {$lang_det = "es";} // spagnolo | |
elseif($language_detect == "ar") {$lang_det = "ar";} // arabo | |
elseif($language_detect == "fr") {$lang_det = "fr";} // francese | |
elseif($language_detect == "ru") {$lang_det = "ru";} // russo | |
elseif($language_detect == "zh") {$lang_det = "zh";} // cinese |
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 | |
error_reporting(0); | |
/*menghilangkan pesan error*/ | |
/* | |
YouTube Downloader v0.03 | |
Author : RianWap ID | |
Facebook : www.facebook.com/rianwap.id |
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 | |
echo "hola jose"; | |
?> |