Kamis, 16 Juni 2016
Cara Membuat Watermark Gambar / Image Mudah dan Sederhana menggunakan PHP Script Gratis Tinggal Siap Pakai
15.46 |
Diposting oleh
Unknown
Cara Membuat Watermark Gambar / Gambar Sederhana Dengan PHP - Watermark atau watermark adalah gambar, simbol atau teks di masukkan ke dalam gambar untuk menandai keaslian atau gambar berhak cipta. Mengapa harus watemark? misalnya, dalam satu kasus kita membuat gambar atau foto dari tembakan kita sendiri dan kemudian kami menyebarkannya, ketika ada pick up dan mengkuinya sebagai hasil karyanya tidak repot-repot tuh nah, kita sudah sulit - sulit untuk membuat dia bahkan mengakui - mengakui buatan sendiri. nah, dengan ini kita bisa menandai gambar watermark dengan nama kami atau simbol khusus kami.
Sebenarnya, itu banyak perangkat lunak untuk watermark bertebaran di internet, apakah offline atau online. kali ini kita akan membuat alat kita sendiri watermark menggunakan skrip PHP, untuk lebih jelasnya, kami hanya berlatih.
A. Persiapan Alat Peralatan Perangnya
Pertama - pertama, sebelum kita mulai menulis script kita mempersiapkan telebih kita harus mempersiapkan beberapa peralatan yang dibutuhkan:
1. Anda harus sudah memiliki localhost
2. Siapkan gambar sebagai gambar watermark, mempersiapkan gambar tipe PNG untuk hasil yang lebih baik.
3. Siapkan jenis font dan kemudian menyimpannya di tempat yang sama bersama-sama dengan proyek Anda, Anda dapat mengunduhnya di: dafont.com
B. Menulis Skrip di Konten Web
Sebelum mulai menulis skrip pertama membuat folder di folder proyek Anda dengan nama upload folder yang akan digunakan untuk menampung gambar watermark kita nanti.
1. Buatlah file script SEBUAH php DENGAN nama di index.php DENGAN isi:
Kalian Juga dapat mengatur konfigurasi watermark anda pada script di atas pada baris berikut :<?php//---- KONFIGURASI WATERMARK$text_show = "Jin Toples"; // text watermark$image_show = "logo4.png"; // gambar watermark$font_path = "Computerfont.TTF"; // jenis font$font_size = 24; // ukuran font contoh 24 = 24px$path = "uploads/"; // folder upload gambar setelah proses watermark$x = 100; //kordinat posisi x text$y = 280; //kordinat posisi y text$msg="";if(isset($_GET['mode'])){$image_path = ($_GET['mode']=="img")? $image_show : $text_show;}else{$image_path = '';}function watermark_image($oldimage_name, $new_image_name){global $image_path;list($owidth,$oheight) = getimagesize($oldimage_name);$width = $height = 300; // tentukan ukuran gambar akhir, contoh: 300 x 300$im = imagecreatetruecolor($width, $height);$img_src = imagecreatefromjpeg($oldimage_name);imagecopyresampled($im, $img_src, 0, 0, 0, 0, $width, $height, $owidth, $oheight);$watermark = imagecreatefrompng($image_path);list($w_width, $w_height) = getimagesize($image_path);$pos_x = $width - $w_width;$pos_y = $height - $w_height;imagecopy($im, $watermark, $pos_x, $pos_y, 0, 0, $w_width, $w_height);imagejpeg($im, $new_image_name, 100);imagedestroy($im);unlink($oldimage_name);return true;}function watermark_text($oldimage_name, $new_image_name){global $font_path, $font_size, $text_show;list($owidth,$oheight) = getimagesize($oldimage_name);$width = $height = 300; // tentukan ukuran gambar akhir, contoh: 300 x 300$image = imagecreatetruecolor($width, $height);$image_src = imagecreatefromjpeg($oldimage_name);imagecopyresampled($image, $image_src, 0, 0, 0, 0, $width, $height, $owidth, $oheight);// tentukan warna teks dalam RGB (255,255,255)$blue = imagecolorallocate($image, 79, 166, 185);// efek teks shadow$shadow = imagecolorallocate($image, 178, 178, 178);//posisi text pada gambarimagettftext($image, $font_size, 0, $x, $y, $blue, $font_path, $text_show);imagejpeg($image, $new_image_name, 100);imagedestroy($image);unlink($oldimage_name);return true;}$demo_image = "";if(isset($_POST['createmark']) and $_POST['createmark'] == "Submit"){$valid_formats = array("jpg","bmp","jpeg");$name = $_FILES['imgfile']['name'];if(strlen($name)){list($txt, $ext) = explode(".", $name);if(in_array($ext,$valid_formats)&& $_FILES['imgfile']['size'] <= 1024*1024){// 1024*1024 = 1 MB limit upload image$upload_status = move_uploaded_file($_FILES['imgfile']['tmp_name'], $path.$_FILES['imgfile']['name']);if($upload_status){$new_name = $path.time().".jpg";if(isset($_GET['mode'])){if(watermark_image($path.$_FILES['imgfile']['name'], $new_name)) $demo_image = $new_name;} else {if(watermark_text($path.$_FILES['imgfile']['name'], $new_name)) $demo_image = $new_name;}}}} else { $msg="File size Max 1 M or Invalid file format supports .jpg and .bmp"; }}?>
$text_show = "Jin Toples"; // text watermark
$image_show = "logo4.png"; // gambar watermark
$font_path = "Computerfont.TTF"; // jenis font
$font_size = 24; // ukuran font contoh 24 = 24px
$path = "uploads/"; // folder upload gambar setelah proses watermark
$x = 100;
$y = 280;
2. Kemudian di bawah script di atas tambahkan script HTML sebagai tampilan untuk mengupload dan hasil watermark :
Maka sekarang script anda selengkapnya adalah :<html><head><title>PHP Text Watermark</title><style type="text/css">body{ width:800px; margin: 15px auto; padding:0px; font-family: arial}</style></head><body><h1><?php// navigasi Text / Image Watermarkif(!isset($_GET['mode'])){echo "Text WaterMark | <a href='".$_SERVER['PHP_SELF']."?mode=img'>Image WaterMark</a>";}else{echo "<a href='".$_SERVER['PHP_SELF']."'>Text WaterMark</a> | Image WaterMark";}?></h1><form name="imageUpload" id="imageUpload" method="post" enctype="multipart/form-data" ><fieldset><legend>Upload Image</legend>Image :<input type="file" name="imgfile" id="imgfile"/><input type="submit" name="createmark" id="createmark" value="Submit" /></fieldset><?php// tampilkan gambar di siniif(!empty($demo_image))echo '<center><img src="'.$demo_image.'" /></center>';elseecho '<h3>'.$msg.'</h3>';?></form></body></html>
<?php
//---- KONFIGURASI WATERMARK
$text_show = "Jin Toples"; // text watermark
$image_show = "logo4.png"; // gambar watermark
$font_path = "Computerfont.TTF"; // jenis font
$font_size = 24; // ukuran font contoh 24 = 24px
$path = "uploads/"; // folder upload gambar setelah proses watermark
$x = 100;
$y = 280;
$msg="";
if(isset($_GET['mode'])){
$image_path = ($_GET['mode']=="img")? $image_show : $text_show;
}else{
$image_path = '';
}
function watermark_image($oldimage_name, $new_image_name){
global $image_path;
list($owidth,$oheight) = getimagesize($oldimage_name);
$width = $height = 300; // tentukan ukuran gambar akhir, contoh: 300 x 300
$im = imagecreatetruecolor($width, $height);
$img_src = imagecreatefromjpeg($oldimage_name);
imagecopyresampled($im, $img_src, 0, 0, 0, 0, $width, $height, $owidth, $oheight);
$watermark = imagecreatefrompng($image_path);
list($w_width, $w_height) = getimagesize($image_path);
$pos_x = $width - $w_width;
$pos_y = $height - $w_height;
imagecopy($im, $watermark, $pos_x, $pos_y, 0, 0, $w_width, $w_height);
imagejpeg($im, $new_image_name, 100);
imagedestroy($im);
unlink($oldimage_name);
return true;
}
function watermark_text($oldimage_name, $new_image_name){
global $font_path, $font_size, $text_show;
list($owidth,$oheight) = getimagesize($oldimage_name);
$width = $height = 300; // tentukan ukuran gambar akhir, contoh: 300 x 300
$image = imagecreatetruecolor($width, $height);
$image_src = imagecreatefromjpeg($oldimage_name);
imagecopyresampled($image, $image_src, 0, 0, 0, 0, $width, $height, $owidth, $oheight);
$blue = imagecolorallocate($image, 79, 166, 185);
// tentukan warna teks dalam RGB (255,255,255)
$shadow = imagecolorallocate($image, 178, 178, 178);
// efek teks shadow
imagettftext($image, $font_size, 0, $x, $y, $blue, $font_path, $text_show);
//posisi text pada gambar
imagejpeg($image, $new_image_name, 100);
imagedestroy($image);
unlink($oldimage_name);
return true;
}
$demo_image = "";
if(isset($_POST['createmark']) and $_POST['createmark'] == "Submit"){
$valid_formats = array("jpg","bmp","jpeg");
$name = $_FILES['imgfile']['name'];
if(strlen($name))
{
list($txt, $ext) = explode(".", $name);
if(in_array($ext,$valid_formats)&& $_FILES['imgfile']['size'] <= 1024*1024){ // 1024*1024 = 1 MB limit upload image
$upload_status = move_uploaded_file($_FILES['imgfile']['tmp_name'], $path.$_FILES['imgfile']['name']);
if($upload_status){
$new_name = $path.time().".jpg";
if(isset($_GET['mode'])){
if(watermark_image($path.$_FILES['imgfile']['name'], $new_name)) $demo_image = $new_name;
} else {
if(watermark_text($path.$_FILES['imgfile']['name'], $new_name)) $demo_image = $new_name;
}
}
}
} else { $msg="File size Max 1 M or Invalid file format supports .jpg and .bmp"; }
}
?>
<html>
<head>
<title>PHP Text Watermark</title>
<style type="text/css">
body{ width:800px; margin: 15px auto; padding:0px; font-family: arial}
</style>
</head>
<body>
<h1><?php
// navigasi Text / Image Watermark
if(!isset($_GET['mode'])){
echo "Text WaterMark | <a href='".$_SERVER['PHP_SELF']."?mode=img'>Image WaterMark</a>";
}else{
echo "<a href='".$_SERVER['PHP_SELF']."'>Text WaterMark</a> | Image WaterMark";
}
?>
</h1>
<form name="imageUpload" id="imageUpload" method="post" enctype="multipart/form-data" >
<fieldset>
<legend>Upload Image</legend>
Image :<input type="file" name="imgfile" id="imgfile"/>
<input type="submit" name="createmark" id="createmark" value="Submit" />
</fieldset>
<?php
// tampilkan gambar di sini
if(!empty($demo_image))
echo '
<center><img src="'.$demo_image.'" /></center>';
else
echo '<h3>'.$msg.'</h3>';
?>
</form>
</body>
</html>
This application has two functions: a watermark using text and image watermark using, for watermarks using your image simply click on the link "Image Watermark".
Watermark Image / Image Simple With PHP now been completed,
Hasilnya akan Tampil Seperti Ini :
Label:
kumpulan source code
|
0
komentar
Scipt / Source Code Gratis untuk Mengirim Email dengan PHP mailer menggunakan SMTP gmail
15.19 |
Diposting oleh
Unknown
Mengirim email dengan php biasanya cukup menggunakan fungi mail saja. Dengan menggunakan fungsi mail pada Script php kita sudah bisa mengirim email dengan format text/pesan secara Automatis. Bagaimana jika kita mengirim email dengan format HTML? mungkin sedikit agak ribet yahh dan bahkan beberapa mail server akan menganggap email sp4mmer.
Dengan menggunakan PHPMailer, kita bisa mengirim email dengan format HTML dan pengaturan lainnya. PHPMailer merupakan library tambahan dalam bentuk class yang dapat dipanggil ketika kita membuat form kirim email dengan php. PHPMailer
berikut ini contoh Script PHP kirim email dengan PHPMailer dan menggunaka SMTP gmail sebagai pengirim email ke email tujuan.
<?phprequire 'PHPMailerAutoload.php';$mail = new PHPMailer;$mail->isSMTP();$mail->SMTPDebug = 1;$mail->Debugoutput = 'html';$mail->Host = "smtp.gmail.com";$mail->Port = 587;$mail->SMTPAuth = true;$mail->Username = "email gmail";$mail->Password = "password gmail";$mail->setFrom('email gmail anda', nama anda);$mail->addAddress('emailtujuan', Nama tujuan);$mail->Subject = "coba kirim email";$mail->msgHTML('<h1>Testing kirim email</h1><p>Pesan dengan format HTML</p><table><tr><td>Penggunaan tabel</td></tr></table>');if (!$mail->send()) {echo "Email gagal dikirim";} else {echo "Email terkirim";}?>
Didalam paket PHPMailer juga sudah terdapat contoh pengiriman email dengan smpt dan lain-lain.
Label:
kumpulan source code
|
0
komentar
Contoh Tesis / Skripsi / Tugas Akhir, Program Aplikasi, Source Code, Visual Basic, PHP, Delphi, Tutorial gratis dan bisa di Edit
14.58 |
Diposting oleh
Unknown
PROGRAM APPLICATION Visual Basic Complete Source Code Free Sample Thesis and Final
PROGRAM mentahan (FULL SOURCE CODE / CAN EDIT) + FULL DATABASE (SQL SERVER & MS. ACCES) VERY SUITABLE FOR TA / Thesis, TASK STUDENTS, WHO DO NOT WANT PROGRAMMER CODING FROM THE BEGINNING
DVD IS REQUIRED HAVE THE STUDENTS, STUDENT & PROGRAMMER
Aplikasi2 you get the DVD package SOURCE CODE has been adapted to various cases in the corporate world. Mahasiswa2 which makes it must undergo PKL (Practice Field work) to understand the condition of the company. Manufacturing was guided by Dosen2 of university masing2, therefore aplikasi2 is made to the procedure and method of designing the right.
Aplikasi2 has been tested and passed the final trial, and have been used in the business world.
you need to do is just
Select Source Code app to suit your needs
Slightly Modified Adjusted Business Profile
The application is ready to use!
This package is divided into two categories:
Application of Visual Basic 6
This application is created with Visual Basic 6.0 programming language and database Access / MySQL
• Academic • Application Sales Application Newspapers
• Accounting Application • Application Ticket Sales
• Goods Instalments Application • Request Credit Application
• Antivirus applications based VB 6 • Application Library
• Pharmacy • Application Application Library
• Insurance • Application Application supplies Goods
• Insurance • Application Inventory Application Drugs
• Insurance Application (Bumi Asih) • Application Point of Sales (POS)
• Applications Bel Schools • Applications Forecast
• Application Workshop • Medical Record Applications
• Application Car repair shops • Application Remote Control PC
• Application Billing Rental • Rental Application CD / DVD
• Application Billing Warnet • Rental Application Video
• Books Retail • Restaurants Apps
• Applications Phonebook • Application Hospital
• Application GOSiR • Application Sales and Inventory
• Cigarette Wholesale Applications • School Applications
• Application Hotel (Sheraton Hotel) • Application Service Vehicles
• Application Inventory items • Applications Savings and Loans
• Application Inventory Distribution • Administration Information System Application Programs
• Computer Hardware Inventory Application • Academic Information System Application (SMA)
• Applications • Freight Information System Application Dokkes North Sumatra Police
• Application café • Business License Information System Applications
• Application Diner • Crime Information System Application
• Application employees PLN • Health Care Information Systems Applications
• Health • Application Application Student Information System Data processing
• Clinical Applications • Residential Sales Information System Applications
• Cooperative Application • Application Information System-based agencies and TKI
• Application Management • Information Systems Applications Project
• Application Centre • Application Maintenance System master Mubaligh
• Applications Payroll • Financial Data Management System Application
• Patient Services Applications • Application decision Support System (FIES)
• Tuition Payment Application • Reward System Application
• Schools • Registration Application SMS Application Gateway Delphi
• Documenting Drug Application SMS gateway • Application VB
• Application of New Student Reception (PMB) • Application Software Toll
• ADM Cost Management Application • Supermarket Applications
• Application Management • Application Supermarket Hotel (POS)
• Health Lab Management Applications • Applications bill
• Payroll application • Application Bookstore
• Application Traffic Lights Control • App Store Sports
• CPU Scheduling Application • Applications SMS Voting
• Sales Application • Application Media Learning Foreign Languages
• Applications Sales & Stock Water • Multiplayer gaming applications
Applications Visual Basic.NET
This application is created with Visual Basic programming language. Net and database SQL Server / Access / MySQL
• Attendance Application
• Pharmacy Applications
• Application Workshop
• App Purchase
• Student Applications
• Application LPK (Institutions of Course)
• Application Management School
• Payroll application
• HP Sales Application
• Application Sales Showroom Motor
• Rental Applications
• Application Library
PHP & MySQL application
• Application of School Information System Web-Based
• Application Store Online (e-commerce)
• Web-based Employee Application
Description: In one type of case studies mentioned above, there can be more than one kind of application.
But Wait There's More .. still ..
In SOURCE CODE Package you also get super bonus on this DVD Super Source Code
FREE BONUS 1
- Free set of Database Company
- Free set of Email Address
- Free set of Purchasing Email Address
- Free set of HRD Email Address
- Free set of Thesis / Final (TA)
FREE BONUS 2
- Free EbookStrategi Buy Home Without Money
- Free Ebook Hundreds Opportunities / Business Idea
- Free Ebook How to Create Web Guide
- Free Ebook Strategies to Make Web Hipno
- Free Ebook Selling Strategies Without Rejection
- Free Ebook Online Business Opportunity
FREE BONUS 3
- Free Software Vb.net
- Free Software Vb.6.0
- Free Software Crystal Report
- Free Software Translator
- Free Software Installer
- Free Software Counter Hp
- Free Software Sales & Stock
- Free Antivirus Full Version
- Free set of Active X Programming
- Free Software Converter
- Free Data Recovery Software
- Free PDF Creator Software
FREE BONUS 4
- Free Tutorial Vb 6.0
- Free Tutorial Vb.net
- database Converter
To Create Reports with Easy & Fast. Most aplikasi2 in DVD Super Source Code using Crystal Report
Database Converter program is able to change the Access database to MySQL, DBF to MySQL, DBF to Oracle, Excel to MySQL, Excel to Oracle, MySQL to DBF, etc.
You can have only Rp. 120,000 alone including postage (temporary price). Package packed in two (2) physical DVD.
REPLACEMENT WARRANTY PACKAGE
All the DVDs we sell have been tested several times to ensure in good condition. but if the DVD is damaged / error, we provide a guarantee Replacement new DVD. We will send back the new DVD to your address at no extra cost.
The point of your position is without risk. (Just information, error occurrence DVD until now has never happened)
I do not want to give the impression of a rough and too pushy you, but still I have to say this to you:
"What are you waiting for, the best opportunity will not last long."
To make a reservation SMS to: 0813-1764-7648
Label:
kumpulan source code
|
0
komentar
Langganan:
Postingan (Atom)