This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Tampilkan postingan dengan label Tugas Sekolah. Tampilkan semua postingan
Tampilkan postingan dengan label Tugas Sekolah. Tampilkan semua postingan

Rabu, 16 September 2015

CARA MEMBUAT CAPTCHA



Pernah dengar Captcha dan Apa itu Captcha?

CAPTCHA atau Captcha adalah suatu bentuk uji tantangan-tanggapan(challange-response test) yang digunakan dalam perkomputeran untuk memastikan bahwa jawaban tidak dihasilkan oleh suatu komputer. Proses ini biasanya melibatkan suatu komputer (server) yang meminta seorang pengguna untuk menyelesaikan suatu uji sederhana yang dapat dihasilkan dan dinilai oleh komputer tersebut. Karena komputer lain tidak dapat memecahkan CAPTCHA, pengguna manapun yang dapat memberikan jawaban yang benar akan dianggap sebagai manusia. Oleh sebab itu, uji ini kadang disebut sebagai uji Turing balik, karena dikelola oleh mesin dan ditujukan untuk manusia, kebalikan dari uji Turing standar yang biasanya dikelola oleh manusia dan ditujukan untuk suatu mesin. CAPTCHA umumnya menggunakan huruf dan angka dari citra terdistorsi yang muncul di layar.

Itulah penjelasan tentang captcha meurut wikipedia, pada kesempatan kali ini saya akan mengajarkan pada anda tentang cara membuat captcha. Oke simak baik-baik!!!


1. Pertama buka aplikasi EditPlus kemudian masukan kode berikut :

<?php

session_start();



//membuat kata acak

$alphaNumeric = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";

$random = substr(str_shuffle($alphaNumeric), 0, 1);

$random1 = substr(str_shuffle($alphaNumeric), 0, 1);

$random2 = substr(str_shuffle($alphaNumeric), 0, 1);

$random3 = substr(str_shuffle($alphaNumeric), 0, 1);

$random4 = substr(str_shuffle($alphaNumeric), 0, 1);

$random5 = substr(str_shuffle($alphaNumeric), 0, 1);





//membuat gambar dg background biru

$image = ImageCreate(100, 50);

$backcolor = ImageColorAllocate($image, 200, 200, 255);

$textColor1 = ImageColorAllocate($image, 0, 0, 0);

$textColor2 = ImageColorAllocate($image, 128, 0, 255);

$textColor3 = ImageColorAllocate($image, 255, 255, 0);

$textColor4 = ImageColorAllocate($image, 100, 200, 50);

$textColor5 = ImageColorAllocate($image, 0, 0, 255);

$textColor6 = ImageColorAllocate($image, 255, 0, 0);





imagestring ($image, 5, 20, 15, $random, $textColor1);

imagestring ($image, 5, 30, 15, $random1, $textColor2);

imagestring ($image, 5, 40, 15, $random2, $textColor3);

imagestring ($image, 5, 50, 15, $random3, $textColor4);

imagestring ($image, 5, 60, 15, $random4, $textColor5);

imagestring ($image, 5, 70, 15, $random5, $textColor6);





//memberi nilai sesi

$_SESSION['image_random_value'] = md5($random);



header('Content-type: image/jpeg');

imagejpeg($image);

imagedestroy($image);

?>

2. Jika sudah simpan di folder C:\xampp\htdocs dan beri nama captcha.php  

3. Buka XAMPP Control Panel kemudian jalankan Apache dan  tunggu hingga Apache aktif



4. Setelah Apache aktif  buka Google Chrome atau Browser Lainnya kemudian tulis di Address Bar Localhost/captcha.php dan lihat hasilnya, karena kode captchanya saya buat random(acak) apabila kita reload halamanya pasti akan berubah-ubah  



5. Begitulah tutorial membuat Captcha walaupun hanya basicnya saja. 


Sekian dulu postingan kali ini , Semoga Bermanfaat, Sampai Jumpa lagi di Postingan yg lain dah!!!

Jumat, 11 September 2015

TUTORIAL MEMBUAT GAMBAR DENGAN PHP

Hai berjumpa lagi dengan Saya,Kali ini saya akan berbagi tentang cara membuat gambar dengan kode program php. silahkan di simak dengan baik-baik!!!


Berikut Langkah-Langkahnya :
1. Oke pertama buka aplikasi EditPlus Kemudian tulis kode program di bawah ini
<?php

header ("Content-type: image/png");

$image = Imagecreate (150,150);

$background = Imagecolorallocate($image, 00, 33, 99);

$color = Imagecolorallocate($image, 206, 192, 233);

imageellipse($image, 75, 70, 130, 130, $color) ;

imagerectangle($image, 66, 76, 85, 59, $color);

imageline($image, 75, 59, 75, 74, $color);

imagearc($image, 75, 90, 32, 32, 0, 180, $color);

imagefilledellipse($image, 50, 40, 30, 25, $color);

imagefilledellipse($image, 100, 40, 30, 25, $color);

imagepng ($image);

?>
2. jika sudah simpan di folder C:\xampp\htdocs dan beri nama sesuka hati(disini saya beri nama tugas) dengan format .php 

3. Buka XAMPP Control Panel kemudian jalankan yg Apache Saja




4. Setelah Apache aktif  buka Google Chrome atau Browser Lainnya kemudian tulis di Address Bar Localhost/(nama file php yg anda buat tadi) dan lihat hasilnya



5. Begitulah tutorial membuat gambar dengan php.


Sekian dulu postingan tentang tutorial membuat gambar dengan php dari saya, Semoga Bermanfaat

Membuat Aplikasi Penghitung Luas & Keliling dengan Basic4android

#Region  Project Attributes
      #ApplicationLabel: B4A Example
      #VersionCode: 1
      #VersionName:
      'SupportedOrientations possible values: unspecified, landscape or portrait.
      #SupportedOrientations: unspecified
      #CanInstallToExternalStorage: False
#End Region
#Region  Activity Attributes
      #FullScreen: False
      #IncludeTitle: True
#End Region

Sub Process_Globals
      'These global variables will be declared once when the application starts.
      'These variables can be accessed from all modules.

End Sub

Sub Globals
      'These global variables will be redeclared each time the activity is created.
      'These variables can only be accessed from this module.

      Private lblkeliling As Label
      Private lblkeliling2 As Label
      Private lblkeliling3 As Label
      Private lblluas As Label
      Private lblluas2 As Label
      Private lblluas3 As Label
      Private txtalas As EditText
      Private txtjari As EditText
      Private txtlebar As EditText
      Private txtpanjang As EditText
      Private txttinggi As EditText
End Sub

Sub Activity_Create(FirstTime As Boolean)
      'Do not forget to load the layout file created with the visual designer. For example:
      Activity.LoadLayout("BangunDatar")

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub



Sub btnsegitiga_Click
      lblluas.Text = 1.5 * txtalas.Text * txttinggi.text
      lblkeliling.Text = 3 * txtalas.Text
End Sub
Sub btnlingkaran_Click
      lblluas3.Text = 3.14 * txtjari.text * txtjari.text
      lblkeliling3.Text = 2 * 3.14 * txtjari.text
End Sub
Sub btnkotak_Click
      lblluas2.Text = txtpanjang.text * txtlebar.text
      lblkeliling2.Text = 2 * txtpanjang.Text * txtlebar.text
End Sub