<?php
try
{
/*** set the image name ***/
$img = 'test.jpg';
/*** read the image into imagick ***/
$Imagick = new Imagick($img);
/*** crop and thumbnail the image ***/
$Imagick->cropThumbnailImage(16,16);
/*** set the format to ico ***/
$Imagick->setFormat('ico');
/*** write the favicon.ico file ***/
$Imagick->writeImage("favicon.ico");
echo 'done';
}
catch(Exception $e)
{
echo $e->getMessage();
}
?>
Create Favicon With Imagick
Degrees To Radians
/*
* @convert degrees to radians
* @param float $degrees
* @return float
*/
function DegreeToRadian($degrees)
{
/*** do the math ***/
return $degrees * pi() / 180;
}
Radians To Degrees
/*
* @convert radians to degrees
* @param float $radians
* @return float
*/
function radiansToDegrees($radians)
{
return $radians * 180 / pi();
}
Remove all non alpha numeric characters except a space
<?php
/**
* Remove all non alpha numeric characters except a space
* @param string $string The string to cleanse
* @return string
*/
function alphanumericAndSpace( $string )
{
return preg_replace('/[^a-zA-Z0-9\s]/', '', $string);
}
?>
objectToArray
/*** a complex object ***/
$obj = new stdClass;
$obj->foo = new stdClass;
$obj->foo->baz = 'baz';
$obj->bar = 'bar';
/**
*
* Convert an object to an array
*
* @param object $object The object to convert
* @reeturn array
*
*/
function objectToArray( $object )
{
if( !is_object( $object ) && !is_array( $object ) )
{
return $object;
}
if( is_object( $object ) )
{
$object = get_object_vars( $object );
}
return array_map( 'objectToArray', $object );
}
/*** convert the array to object ***/
$array = objectToArray( $obj );
/*** show the array ***/
print_r( $array );
?>
List of Free Web Directories
http://www.onewaytextlink.com/links.php?type=free
http://topsitetools.com/auto-submit-website-tools/top-100-google-yahoo-blog-submission-sites.html
translate with bing
echo translateBing($text,$fromLang,$toLang);
function translateBing($text, $fromLang, $toLang) {
$res = '';
$step = 10000; //10240;
for ($i = 0; $i < strlen($text); $i += $step) {
$subtext = substr($text, $i, $step);
$res .= do_translateBing($subtext, $fromLang, $toLang);
}
return $res;
}
function do_translateBing($text,$fromLang,$toLang){
$AppId = "xxxxx";
$url = 'http://api.microsofttranslator.com/v2/Http.svc/Translate?appId='.$AppId.'&text='.urlencode($text).'&from='.$fromLang.'&to='.$toLang;
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040608'); //you can use another user agent, please see www.user-agents.org
$result = curl_exec($ch);
curl_close($ch);
$result = str_replace('<', '<', $result);
$result = str_replace('>', '>', $result);
if (strlen($result) == 0 && strlen($text) > 100) {
//return translateBing(substr($text,0,strlen($text)/2), $fromLang, $toLang).translateBing(substr($text,strlen($text)/2), $fromLang, $toLang);
echo 'troppo grande '.strlen($text);
}
return $result;
}
Non sai cosa scrivere ?
non sai cosa scrivere ? non riesci a scrivere l’articolo al giorno ?
usiamo i database di articoli ..
http://scriptmafia.org/cms/15782-full-wordpress-database-14000-articles-medical-niche.html
http://mydatamaster.com/free-downloads/
http://www.hooverwebdesign.com/articles/free-plr-articles.html
http://freeaffiliatemarketingtipsandtools.com/free-plr-articles/
http://www.plrarticlesfree.net/download-link-free-plr-articles/
http://forums.digitalpoint.com/showthread.php?t=901403
(questi son solo link che ho trovato tramite google, non mi prendo alcuna responsabilita’ su cosa trovate)
Professioni informatiche
1) Il Project Manager è una persona che pensa che 9 donne possono fare un bambino in 1 mese.
2) Lo Sviluppatore è la persona che pensa che ci vorranno 18 mesi per fare un bambino
3) Il Coordinatore locale è uno che pensa che 1 donna può fare 9 bambini in un mese.
4) Il Cliente è uno che non sa perché vuole un bambino.
5) Il Marketing Manager è una persona che pensa di poter fare un bambino anche se non ha un uomo e una donna a disposizione
6) Il Team di Ottimizzazione delle risorse pensa che non ha bisogno di un uomo e di una donna: farà fare il bambino con zero risorse.
7) Il Team di Documentazione pensa che non importa se il bambino nasce, ma che è importante documentare i 9 mesi
L’Auditor della Qualità è la persona che non è mai contento del processo per fare un bambino.
9) L’Architetto è la persona che disegna tre diversi modi per fare un bambino senza testarne nessuno.
10) Lo Specialista è la persona che ogni volta che deve fare un bambino cambia processo.
11) Il Consulente è la persona, che dopo una profonda intervista ed analisi con la moglie del cliente, descrive il processo necessario per fare un bambino.