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
grep -iRI -n "base64_decode" ./ |
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
Each YouTube video has 4 generated images. They are predictably formatted as follows: | |
http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg | |
http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg | |
http://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg | |
http://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg | |
The first one in the list is a full size image and others are thumbnail images. The default thumbnail image (ie. one of 1.jpg, 2.jpg, 3.jpg) is: | |
http://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg | |
For the high quality version of the thumbnail use a url similar to this: |
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 new_table_name LIKE old_table_name; | |
INSERT new_table_name SELECT * FROM old_table_name; |
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 delTree($dir) | |
{ | |
$files = array_diff(scandir($dir), array('.','..')); | |
foreach ($files as $file) { | |
(is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file"); | |
} | |
return rmdir($dir); | |
} | |
?> |
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 | |
header("Content-Type: text/xml"); | |
$array = array ( | |
'10.10.10.10' => 'Server' | |
); | |
$xml = new SimpleXMLElement('<root/>'); | |
array_walk_recursive($array, array ($xml, 'addChild')); | |
print $xml->asXML(); | |
?> |
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
<? | |
header ("Content-type: image/png"); | |
$code = array(); | |
$code['start'] = '1001011011010'; | |
$code['1'] = '110100101011'; | |
$code['2'] = '101100101011'; | |
$code['3'] = '110110010101'; | |
$code['4'] = '101001101011'; | |
$code['5'] = '110100110101'; | |
$code['6'] = '101100110101'; |
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 pre($array=false,$description=false,$debug_print_trace=false) { | |
$debug_trace = debug_backtrace(); | |
if($debug_print_trace){ | |
foreach(debug_backtrace() as $k=>$v){ | |
if($v['function'] == "include" || $v['function'] == "include_once" || $v['function'] == "require_once" || $v['function'] == "require"){ | |
$backtracel .= "#".$k." ".$v['function']."(".$v['args'][0].") called at [".$v['file'].":".$v['line']."]<br />"; | |
}else{ | |
$backtracel .= "#".$k." ".$v['function']."() called at [".$v['file'].":".$v['line']."]<br />"; | |
} |
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
<? | |
ini_set('display_errors',1); | |
ini_set('error_reporting',2047); | |
?> |
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
<? | |
$res = CIBlockSection::GetList( | |
Array('name' => 'asc'), | |
Array('IBLOCK_ID' =>'5' , 'ACTIVE' => 'Y') | |
); | |
while ($row = $res->GetNext()) | |
{ | |
echo $row['NAME'].'<br>'; | |
$rsParentSection = CIBlockSection::GetByID($row['ID']); | |
if ($arParentSection = $rsParentSection->GetNext()) |
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
<? | |
$arSelect = Array("ID", "NAME", "TIMESTAMP_X"); | |
$arFilter = Array("IBLOCK_ID"=>"21", "<TIMESTAMP_X"=>"31.12.2013 23:59:59"); | |
$res = CIBlockElement::GetList(Array(), $arFilter, false, Array("nPageSize"=>1000), $arSelect); | |
echo $res->SelectedRowsCount(); | |
while($ob = $res->GetNextElement()) | |
{ | |
echo "<pre>"; | |
$arFields = $ob->GetFields(); | |
print_r($arFields); |