Location: PHPKode > projects > MyOWNSpace > MyOWNspace_v8.2/www/myownad/myspacebanner.php
<?php
// This is a demonstration script to allow you to experiment with
// different settings to get a feel for what this class can do.
$myownfont=array('punk kid.ttf','theyrecomingtotakemeaway.ttf','LCD-BOLD.TTF','comicbd.TTF','COURBD.TTF','impact.TTF','tahomabd.TTF','TIMESBD.TTF','verdanab.TTF','arial.ttf','comic.ttf','cour.ttf','georgia.ttf','times.ttf','verdana.ttf');
$myownbackground=array('brik.jpg','marble.jpg','spirale.jpg','spirale2.jpg','spirale3.jpg','warning.jpg','wood.jpg');
$friends=rand(1000,5000);
$myownad=array( "1" => array 
("titre"=>"Suicide is painless!", 
"texte"=>"unsubcribe from Myspace now!",
 "lien"=>"myownspace.fr")  ,
 "2" => array 
("titre"=>"Good karma : suicide yourself..", 
"texte"=>"..from Myspace!",
 "lien"=>"myownspace.fr"),
 "3" => array 
("titre"=>"Still on Myspace?", 
"texte"=>"Get your OWN space NOW!",
 "lien"=>"www.myownspace.fr"),
 "4" => array 
("titre"=>"Myspace", 
"texte"=>"A place for friends of Bush",
 "lien"=>"myownspace.fr"),
 "5" => array 
("titre"=>"Another world is possible", 
"texte"=>"Leave Myspace first!",
 "lien"=>"myownspace.fr"),
 "6" => array 
("titre"=>"Tired of your ".$friends." friends?", 
"texte"=>"Join the unsocial network",
 "lien"=>"myownspace.fr"),
  "7" => array 
("titre"=>"GET A LIFE!", 
"texte"=>"suicide from Myspace.com",
 "lien"=>"myownspace.fr"),
  "8" => array 
("titre"=>"Myspace sucks ?", 
"texte"=>"Join the underground :)",
 "lien"=>"myownspace.fr"),
  "9" => array 
("titre"=>"STOP THE MASSACRE!", 
"texte"=>"Get your OWN space",
 "lien"=>"myownspace.fr"),
  "10" => array 
("titre"=>"FREE YOUR MIND", 
"texte"=>"Create a free space today",
 "lien"=>"myownspace.fr")
 );

$rnd_txt=rand(1,count($myownad));
$rnd_bg=rand(0,count($myownbackground));
$rnd_font=rand(0,count($myownfont));

// fs=fontsize
// iw=imageWidth
// ih=imageHeight
// bg=bgColor(ex:FF0000)
// tc=textColor(ex:000099)
require "../classes/text2image/class.atextimage.php";
$timg = new ATextImage();

if(isset($_GET['bg'])){
$color=$_GET['bg'];
	$bg_r = hexdec(substr($color, 0, 2));
	$bg_g = hexdec(substr($color, 2, 2));
	$bg_b = hexdec(substr($color, 4, 2));
	}
if(isset($_GET['tc'])){
$color=$_GET['tc'];
	$tc_r = hexdec(substr($color, 0, 2));
	$tc_g = hexdec(substr($color, 2, 2));
	$tc_b = hexdec(substr($color, 4, 2));	
	}
$timg->SetBackground((isset($_GET['bg']))?$bg_r:rand(1,255),(isset($_GET['bg']))?$bg_g:rand(1,255),(isset($_GET['bg']))?$bg_b:rand(1,255));
$timg->SetTextColor((isset($_GET['tc']))?$tc_r:rand(1,255),(isset($_GET['tc']))?$tc_g:rand(1,255),(isset($_GET['tc']))?$tc_b:rand(1,255));
$timg->SetPos("center","center","center");       // (horizontal,vertical) positions
$timg->SetFont("../classes/text2image/fonts/".$myownfont[$rnd_font],(isset($_GET['fs']))?$_GET['fs']:rand(12,22));
$timg->AddLine($myownad[$rnd_txt]['titre']);
$timg->AddLine($myownad[$rnd_txt]['texte']);
$timg->AddLine("http://".$myownad[$rnd_txt]['lien']);
//$timg->CreateImage("/classes/text2image/background/".$myownbackground[$rnd_bg]);
$timg->MakeImage((isset($_GET['iw'])&&$_GET['iw']<1500)?$_GET['iw']:0,(isset($_GET['ih'])&&$_GET['ih']<1500)?$_GET['ih']:0);
$timg->ShowJpg();


?>
Return current item: MyOWNSpace