IFLashLord Design Studio
13 Jun
Hi - This is a Sample Basic Calss For Water Mark Picture
SAve This As (watermark.php) Name
<?php
var $image_location;
$img = GetImageSize($this->image_location);
$height = $img[1];
switch ($this->image_type)
case ‘jpg’:
case ‘jpeg’:
//Here is JPG Loader
$im2 = imagecreatefromjpeg($this->image_location);
//End JPG loader
//Now JPG Text Color Change Tricks
$im = imagecreate($width,$height);
imagecopy($im,$im2,0,0,0,0,$width,$height);
case ‘png’:
$im = imagecreatefrompng($this->image_location);
}
//$black = imagecolorallocate($im,10,32,234);
$black = imagecolorallocate($im,12,132,34);
imagestring($im,$this->size,0,$height-30,$this->copyright_text,$black);
//header (”Content: image/png”);
//imagepng($im);
header (“Content: image/jpeg”);
imagejpeg($im);
}
?>
And Example For Test
<?php
//This timein same folder
//This could be any value from 1 to 5
![]()
6 May
سلام یک کلاس جدید پی اچ پی نوشتم گزاشتم برای علاقه مندان عزیز این کلاس برای ساختن وی کارد هستش که درن آن اطلاعات شما مثل ایمیل تلفن و غیره قرار می گیره و کاربر با کلیک بر روی فایل ایجاد شده در نرم افزار هایی مثل OutLook میتونه تمامی اطلاعات شما رو ببینه و ذخیره کنه.
گروه های که این کلاس توش قرار می گیره :
Files and Folders
User Management
برنامه نویسش هم که خودم (بهروز)
درباره این کلاس پی اچ پی :
این کلاس می تونه فایل های که شامل اطلاعات کاربر هستش رو ایجاد کنه با امکان آپلود و دانلود
این کلاس می تونه اطلاعات شما را توسط یک آرایه دریافت کنه و به راحتی فایل رو ایجاد کنه
و حالا لینک دانلود برای PHP Classes باز ها
hello
See My New Class PHP Vcard Creator Full Online By Download
Groups:
Files and Folders
User Management
Supplied by:
Behrouz Pooladrag (Me)
Detailed description:
This class can be used to generate user contact files in vCard format.
It takes as parameter an associative array with the user contact details.
The class can generate and store the vCard files or serve them for download.
25 Apr
همون طور که دوستان عزیز به خصوص برنامه نویسها می دونن در پی اچ پی تابعی وجود داره که هرnl یا new line رو به تگ <br> تبدیل می کنه و حال تا بعی برای برعکس این حالت و جود ندارد و راه حل نوشتن تابعی جدید است که در زیر می بینید:
( این تابع هر دو نوع تگ br که به صورت <br> و </br> می باشد را به خط جدید یا nl تبدیل می کند)
// convert Newline to <Br>
// iflashlord.com - Behrouz Pooladrag
function br2nl($string){
$string = preg_replace('/\<br\s*\></br\s*\>/i', "", $string);
return $string;
}//end function
14 Apr
یک کلاس برای امنیت ایمیل ها در برای اسپم ها
امیدوارم بدرد برنامه نویس های عزیز بخوره
<?php
/**
+————————————————————————-
+———————->> In The Name Of Allah <<————————-
+————————————————————————-
| Class AntiIFLSpamBotEmail version 0.0.1 (for php 4)
| Security Email Print 100% Protected For Spam Bot
| Anti Span Bot Email by ASCII
| Author Behrouz Pooladrag (IFLashLord) <Me [at] IFLashLord [dot] Com>
| Email bugs/suggestions to Me [at] iflashlord.com
| Copyright (c) 2008 By Behrouz Pooladrag ,IFLashLord Co.
+————————————————————————-
| This script has been created and released under
| the GNU GPL and is free to use and redistribute
| only if this copyright statement is not removed
+————————————————————————-
+————–| Contact 2 Behrouz Pooladrag |—————————-
| Email : Me [ at ] IFLashLord [dot] Com
| WebSite : http://www.IFLashLord.Com
| Yahoo : BehrouzPC [at] yahoo.Com
| G-Mail : FLashLordX [at] gmail.Com
| Mobile : +98 913 12 777 14
+————————————————————————-
| (Zakate Elame Nasher Aan Ast )
+————————————————————————-
**/
/*
+————–| arguments |———————————————-
|*new AntiIFLSpamBotEmail (string [Email Address for AntiSpam]);
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|*AntiIFLSpamBotEmail->antispambot([integer Number]);
| Number 0 —> For Show Email text Print
| Number 1 —> For Set Email to Link (mailto:..)
| Number 2 —> Return Randomly Part Of Eamil in Hexadecimal
+————————————————————————-
*/
/* Full Exampel of This Class
$antiSpambotBehrouzpc=new AntiIFLSpamBotEmail("behrouzpc@yahoo.com“); //start class
$EmailForShow=$antiSpambotBehrouzpc->antispambot(0); // for show mode return
$EmailForLink=$antiSpambotBehrouzpc->antispambot(1); // for link mode return
print “<a href=’mailto:”.$EmailForLink.”‘>”.$EmailForShow.”</a>”; //and Print
*/
/* Result is this Type
<a href='mailto:behr%6f%75zpc@ya%68oo%2ec%6f%6d'>
behrouzpc@yahoo.com</a>
*/
/////////////////////////////////////////////////////
//Start Class
class AntiIFLSpamBotEmail {
var $VERSION = '0.0.1';
var $emailaddy; //construct
function AntiIFLSpamBotEmail ($emailaddy) {
$this->emailaddy=$emailaddy;
}//end function construct //function to add leading zeros when necessary
function zeroise($number,$threshold) {
return sprintf(’%0′.$threshold.’s’, $number);
}//end function //function to change words To ASCII Random
function antispambot($mailto=0) {
$emailNOSPAMaddy = ”;
srand ((float) microtime() * 1000000);
for ($i = 0; $i < strlen($this->emailaddy); $i = $i + 1) {
$j = floor(rand(0, 1+$mailto));
if ($j==0) {
$emailNOSPAMaddy .= ‘’.ord(substr($this->emailaddy,$i,1)).’;';
} elseif ($j==1) {
$emailNOSPAMaddy .= substr($this->emailaddy,$i,1);
} elseif ($j==2) {
$emailNOSPAMaddy .= ‘%’.$this->zeroise(dechex(ord(substr($this->emailaddy, $i, 1))), 2);
}
}
$emailNOSPAMaddy = str_replace(‘@’,'@’,$emailNOSPAMaddy);
return $emailNOSPAMaddy;
}//end function
}//end Class
?>
16 Mar
بــــــسم الــــلــــه الـــرحمن الــــرحيم
با سلام خدمت دوستان عزیز
مطلب تقریبا اول فارسی رو با یک کلاس توپ پي اچ پي شروع می کنم
امیدوارم خوشتون بیاد
// The following class encrypts a password, and writes it to a .htpasswd
// file for use with .htaccess encryption.
// IFLashLord.Com
// Behrouz Pooladrag
// Me [---at---] IFLashLord [---dot---] Com// Example usage:
//
// $username="behrouz";
// $password = "behrouz";
// $theLine = $htpasswd->genLine($username, $password);
// $htpasswd->writeFile(".htpasswd",$theLine);
//
//
//
// NOTE: Do NOT encrypt the password before calling the genLine function,
// otherwise the password will be encrypted twice, and will not work.class htpasswd {// Encrypts given password
function encryptPW($thePW){
$thePW = crypt(trim($thePW),base64_encode(CRYPT_STD_DES));
return $thePW;
}// Calls the encryptPW function, generates the line for writing
function genLine($username,$password){
$encrypted_password = $this->encryptPW($password);
return "$username:$encrypted_password";
}// Writes data to the file
function writeFile($theFile,$theLine){
$fp = fopen($theFile, "a");
$orig_size = filesize($theFile);// Trims all whitespace
$theContents = file_get_contents($theFile);
$strippedContents = str_replace(" ", "", $theContents);ftruncate($fp, 0);
fwrite($fp, $strippedContents);
// Sets file pointer to the end of the file
fseek($fp, filesize($theFile));
// If this is the first entry in the file, do not add a new line before writing
if($orig_size == 1){
fwrite($fp, "$theLine");
}else{
// If this is not the first entry, write the data on a new line in the file
fwrite($fp, "$theLine");
}
fclose($fp);
}
}
?>
11 Mar
PHP provides a mechanism, array_walk( ), for calling a user-defined function once per element in an array:
array_walk(array, function_name);
The function you define takes in two or, optionally, three arguments: the first is the element’s value, the second is the element’s key, and the third is a value supplied to array_walk( ) when it is called. For instance, here’s another way to print table columns made of the values from an array:
function print_row($value, $key) {
print(”<tr><td>$value</td><td>$key</td></tr>\n”);
}
$person = array(’name’ => ‘Fred’, ‘age’ => 35, ‘wife’ => ‘Wilma’);
array_walk($person, ‘print_row’);
A variation of this example specifies a background color using the optional third argument to array_walk( ). This parameter gives us the flexibility we need to print many tables, with many background colors:
function print_row($value, $key, $color) {
print(”<tr><td bgcolor=$color>$value</td><td bgcolor=$color>$key</td></tr>\n”);
}
$person = array(’name’ => ‘Fred’, ‘age’ => 35, ‘wife’ => ‘Wilma’);
array_walk($person, ‘print_row’, ‘blue’);
The array_walk( ) function processes elements in their internal order.