Microweber is a content management system of new generation that allows you to make your website by drag and drop.
You can easily manipulate the content and the layout of your pages without the need to write code.
<?php | |
//original article is here http://css-tricks.com/snippets/php/sanitize-database-inputs/ | |
function cleanInput($input) { | |
$search = array( | |
'@<script[^>]*?>.*?</script>@si', // Strip out javascript | |
'@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags |
Microweber is a content management system of new generation that allows you to make your website by drag and drop.
You can easily manipulate the content and the layout of your pages without the need to write code.
<?php | |
class Foo { | |
public function bar() { | |
echo 'foo'; | |
} | |
} | |
class Bar { | |
private $foo; |
<?php | |
action_hook('before_user_login', 'my_user_login'); | |
function my_user_login($params) | |
{ |
http://forums.cpanel.net/f42/auto-creation-mysql-db-postwwwacct-166494.html | |
#!/usr/bin/php -q | |
<?php | |
//set error handling so any warnings are logged | |
ini_set('error_log','/usr/local/cpanel/logs/error_log'); | |
ini_set('display_errors',0); |
<?php | |
function svgScaleHack($svg, $minWidth, $minHeight) | |
{ | |
$reW = '/(.*<svg[^>]* width=")([\d.]+px)(.*)/si'; | |
$reH = '/(.*<svg[^>]* height=")([\d.]+px)(.*)/si'; | |
preg_match($reW, $svg, $mw); | |
preg_match($reH, $svg, $mh); | |
if(!isset($mw[2]) and isset($mh[2])){ | |
$mw[2] = $mh[2]; |
Copyright (c) 2008-2012 Nicholas O'Leary | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: |
<?php | |
function textbetweenarray($s1,$s2,$s){ | |
$myarray=array(); | |
$s1=strtolower($s1); | |
$s2=strtolower($s2); | |
$L1=strlen($s1); | |
$L2=strlen($s2); | |
$scheck=strtolower($s); | |
do { |
/** | |
* Demonstrate an efficient way to search the last 100 lines of a file | |
* containing roughly ten million lines for a sample string. This should | |
* function without having to process each line of the file (and without making | |
* use of the “tail” command or any external system commands). | |
*/ | |
$filename = '/opt/local/apache2/logs/karwin-access_log'; | |
$searchString = 'index.php'; | |
$numLines = 100; |
<?php | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* http://groups.google.com/group/php-standards/web/final-proposal | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. |