Membuat Captcha dengan background berubah-ubah menggunakan PHP

0
Petama buat gambar background kemudian simpan di C:\xampp\htdocs dengan nama bg1.jpg , bg2.jpg , bg3. jpg , bg4.jpg , bg5.jpg

kode:
<?php
session_start();
$alpanumeric="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$random = substr(str_shuffle($alpanumeric),0,5);
$bg = rand(1, 5);
$image = imagecreatefromjpeg("bg$bg.jpg");
$textcolor = imagecolorallocate($image, 0, 0, 0);
imagestring($image, 5, 5, 8, $random, $textcolor);
$_SESSION['image_random_value']=md5($random);
header('content-type: image/jpeg');
imagejpeg($image);
imagedestroy($image);
?>





Membuat Aplikasi Browser Android di Appsgeyser

0


Langkah-langkah:
1. Buka www.appsgeyser.com
2. Login terlebih dahulu
3. Kemudian klik "CREATE NOW"
4. Pilih Browser
5. Setelah itu setting sesuai dengan keinginan
6. Jika sudah kemudian klik next
7. Beri nama aplikasi tersebut, klik next
8. Pada bagian "DESCRIPTION" klik next
9. Kemudian buat icon dengan cara klik "Custom Icon" atau bisa upload icon dari komputer anda klik next
10. Klik "CREATE APP"
11. Silahkan anda download aplikasi tersebut dan jalankan di HP android anda
12. Selamat mencoba

screenshot:




Membuat Captcha Dengan PHP

0


<?php
//captcha basic
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);
$textColor = imagecolorallocate($image, 0, 0, 0);
$textColor1 = imagecolorallocate($image, 255, 0, 0);
$textColor2 = imagecolorallocate($image, 0, 200, 0);
$textColor3 = imagecolorallocate($image, 0, 0, 255);
$textColor4 = imagecolorallocate($image, 255, 255, 0);
$textColor5 = imagecolorallocate($image, 255, 0, 255);

imagestring ($image, 10, 20, 13, $random, $textColor);
imagestring ($image, 10, 30, 13, $random1, $textColor1);
imagestring ($image, 10, 40, 13, $random2, $textColor2);
imagestring ($image, 10, 50, 13, $random3, $textColor3);
imagestring ($image, 10, 60, 13, $random4, $textColor4);
imagestring ($image, 10, 70, 13, $random5, $textColor5);

//memberi nilai sesi
$_SESSION['image_random_value'] = md5($random);

header('Content-type: image/jpeg');
imagejpeg($image);
imagedestroy($image);
?>

Membuat Aplikasi Luas dan Keliling Menggunakan B4A

0
#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



Membuat Gambar Wajah Menggunakan PHP

0


<?php
header("content-type: image/png");
$image = ImageCreate (250, 250);
$background = ImageColorAllocate ($image, 00, 33, 99);
$color = ImageColorAllocate($image, 206, 192, 215);
ImageEllipse ($image,120,120,175,175,$color) ; //Membuat lingkaran
ImageArc($image, 120, 140, 100, 70, 0, 180, $color); //Menggunakan Derajat
ImageRectangle($image,130,150,110,120,$color); //Kotak 'hidung'
ImageRectangle($image,130,150,120,120,$color); //Kotak 'hidung'
ImageFilledellipse($image,75,90,40,20,$color); //lingkaran 'Mata_1'
ImageFilledellipse($image,170,90,40,20,$color); //lingkaran 'Mata_2'
Imagepng ($image);