+10 344 123 64 77

Monday, July 28, 2014

webprogrammingwebid.blogspot.com - pasi para pencita blogger kali webprogrammingwebid berbagi ilmu tentang Menentukan Nilai Ganjil Dengan Do-While Di PHP. yukkk langsung aj lihat script di bawah ini :

<?php

$nilaiAwal=0;
$nilaiAkhir=10;

do{

if ($nilaiAwal % 2){
echo "$nilaiAwal adalah Bil. Ganjil";
echo "</br>";
}
$nilaiAwal++
}while($nilaiAwal<$nilaiAkhir);
?>

Friday, July 25, 2014

webprogrammingwebid.blogspot.com - pasi para pencita blogger kali webprogrammingwebid berbagi ilmu tentang pengulangan menggunakan For dan Foreach PHP. yukkk langsung aj lihat script di bawah ini :

<?php
// contoh pertama pengulangan menggunakan for

$dataArray=array("red","green","yellow","blue");

echo"Mengakses Data Array dengan For :"."<br>";
$jmlData= sizeof($dataArray);

for($i=0; $i<$jmlData; $i++ ){
echo "Warna =".$dataArray[$i];
echo "<br>";
}
// contoh kedua pengulanagn menggunakan foreach
echo"<br>";
echo"Mengakses Data Array dengan Foreach :"."<br>";
foreach($dataArray as $value){
echo"warna =".$value;
echo"<br>";
}
?>

semoga bermanfaat....
salam
webprogrammingwebid.blogspot.com
webprogrammingwebid.blogspot.com - siang para pencita blogger kali webprogrammingwebid berbagi ilmu tentang Pengulanagan pada PHP dan HTML. yukkk langsung aj lihat script di bawah ini :

<html>
<head>
<title> Simple loop PHp dan html</title>
</head>

<body>
Contoh Penggunaan Looping  php dan html
<br>
<?php for ($i; $i<4; $i++) {
saya di cetak melalui html dan loopnya php
<?php}?>
</body>
</html>


semoga bermanfaat....
salam
webprogrammingwebid.blogspot.com

Tuesday, July 22, 2014

Bagi saya, setelah membangun sebuah website, maka hal yang paling sulit adalah menjaganya dari serangan hacker. Salah satu hal yang juga rawan terjadi pada sebuah website adalah "Direktori Indexing" yaitu suatu kondisi dimana user mengakses direktori-direktori website dengan secara langsung melalui address bar tanpa antarmuka pada halaman website tersebut. Sebagai contoh halaman diatas saya mengakses direktori asset pada web yang tertanam di localhost.

Umumnya, jika User melakukan direktori Listing pada halaman website kita maka dia akan bisa melihat file-file pada direktori tersebut secara langsung dan tentu saja hal ini mengacu pada keamanan sistem informasi pada website tersebut karena diakses oleh orang yang tidak tepat.



Tapi jangan khawatir, hal tersebut dapat kita atasi dengan dua cara sebagai berikut

1. Menambahkan File index.html pada masing-masing direktori yang ada dalam website kita. Hal ini mungkin akan memakan waktu yang cukup lama karena dalam sebuah halaman website tidak mungkin hanya berisi 2 atau 3 direktori

2. Cara kedua adalah dengan membuat File .htaccess pada direktori root website kita. Dengan cara ini jika user melakukan direktori listing maka halaman yang akan ditampilkan seperti gambar diatas. adapun contoh script htaccess yang saya gunakan adalah sebagai berikut. Simpan dengan nama .htaccess
1Options All -Indexes

Saturday, July 19, 2014

webprogramming.web.id - Sistem Informasi Nilai Siswa Berbasis Sms Gateway 

Halaman Login :

Halaman Home :



Halaman Data Siswa :


Dan Masih Banyak Screen Shot lainya.. 

Dimari Download Sistem Pendukung Keputusan Penerima Beasiswa [Studi Kasus MA YKUI Maskumambang]

Friday, July 18, 2014


webprogramming.web.id - Sistem Informasi Nilai Siswa Berbasis Sms Gateway 

Hamalan Login :


Halaman Home :


Halaman Admin Siswa :

Halaman Tambah Siswa :

Dan masih banyak lagi Future lainya... :
Langsung di mari Download webprogramming.web.id - Sistem Informasi Nilai Siswa Berbasis Sms Gateway 
WebProgramming.web.id - puji syukur aku panjatkan pada allah SWT. akhirnya WebProgramming.web.id bisa posting perdana yang berjudul Membaut Halaman Login Tanpa Database.

anda bisa lihat screen shotnya di bawah ini :



Download Script Di mari Membaut Halaman Login Tanpa Database
In this part of the PHP tutorial, we will talk about basic programming in PHP. 

All the PHP code is surrounded by two delimiters, <?php and ?>. The 'php' string is optional but recommended. 

<?php 

# PHP code

?>
PHP code is put between two delimiters. 

<?php 

$a = 23;
print $a;

?>
This PHP script assigns a value to a variable. It prints it to the console. Note that we say console, because here we use the PHP_CLI command line interpreter. If you test these examples on the web, the output will be sent to the browser. 

$a = 23;
We assign a value 23 to the $a variable. Each variable starts with a dollar character. This PHP code line is a statement. Each statement ends with a semicolon. In PHP, semicolons are not mandatory, like in Javascript or Ruby. They are obligatory. 

print $a;
We print the $a variable to the console. The print keyword does not add a new line to the output. If we want a new line, we must put it manually.print keyword takes only one argument. 

<?php 

$a = 23;
$b = 24;

echo $a, "\n", $b, "\n";

?>
In this script, we use the echo keyword. It is similar to the print keyword. Unlike the print keyword, it can take multiple arguments. 

$a = 23;
$b = 24;
We define two variables. 

echo $a, "\n", $b, "\n";
We print the variables to the console. We also include the new line characters. Arguments can be separated by commas. 

$ php echo.php 
23
24
This is the output of the script. 

TYPES

PHP is a weakly typed language. It works with types, but the programmer does not specify them when declaring variables. A data type is a one of various types of data, as double, integer, or boolean. Values of a certain data type are from a specific range of values stating the possible values for that type, the operations that can be done on that type, and the way the values of that type are stored. PHP works implicitly with data types. Programmers do not specify explicitly the data types. 

<?php 

$a = "Jane";
echo "$a \n";

$a = 12;
echo "$a \n";

$a = 56.4;
echo "$a \n";

$a = true;
echo "$a \n";

?>
In this PHP script, we have an $a variable. First, we assign it a string, then an integer, a double and finally a boolean value. If we assign a string to a variable the PHP automatically creates a string variable. 

$ php dynamic.php 
Jane 
12 
56.4 
1 
Running the script. 

<?php 

$temperature = 12.4;
$name = "Jane";
$age = 17;
$values = array(1, 2, 3, 4, 5, 6); 

class Being {};

$somebody = new Being();

echo gettype($temperature), "\n";
echo gettype($name), "\n";
echo gettype($age), "\n";
echo gettype($values), "\n";
echo gettype($somebody), "\n";

?>
In the above PHP script, we dynamically create five types. 

$values = array(1, 2, 3, 4, 5, 6); 

class Being {};
This is an array and a class. Both types will be covered later in more detail. 

echo gettype($temperature), "\n";
The gettype() function returns the type of the variable in question. 

$ php gettype.php 
double
string
integer
array
object
This script lists the basic types of the PHP language. 

CONSTANTS

In PHP, we can create constants. A constant is a name for a value that, unlike a variable, cannot be reassociated with a different value. We use the define() function to create constants in PHP. 

<?php 

define("BLUE", "0000FF");

echo BLUE, "\n";

echo defined("BLUE");
echo "\n";

?>
In this PHP script, we define a BLUE constant. 

define("BLUE", "0000FF");
Here we define the BLUE constant. It is a convention to write constants in uppercase letters. 

echo BLUE, "\n";
Here we use it. Note that constants are not preceded by ($) dollar character. 

echo defined("BLUE");
We have used another function, the defined() function. It checks, if a particular constant exists. Returns true, if it does. 

$ php constant.php 
0000FF
1
Running the example gives the above output. 
PHP also has some predefined constants. 

<?php 

echo TRUE;
echo "\n";
echo PHP_VERSION;
echo "\n";
echo PHP_OS;
echo "\n";
echo __LINE__;
echo "\n";
echo __FILE__;
echo "\n";
echo DIRECTORY_SEPARATOR;
echo "\n";
echo PHP_DATADIR;
echo "\n";

?>
Here we print some built-in PHP constants. For example, the PHP_OSconstant prints the OS version on which the PHP was built. 

$ php constants.php 
1
5.2.6-2ubuntu4.6
Linux
9
/home/vronskij/programming/php/basics/constants.php
/
${prefix}/share
On my system, I get this output. 

VARIABLE INTERPOLATION

Next, we will define interpolation. Variable interpolation is replacing variables with their values inside string literals. Another names for variable interpolation are: variable substitution and variable expansion. 

<?php 

$age = 17;

echo "Jane is $age years old\n";

?>
The $age variable is replaced with the value 17 in the string. 

$ php interpolation.php 
Jane is 17 years old
<?php 

$age = 17;

echo 'Jane is $age years old\n';

?>
However, this does not work, if we use the single quotes. In this case, no interpolation happens and no special characters are working. 

$ php interpolation2.php 
Jane is $age years old\n$ 
We see a verbatim output of the string. 

INCLUDING FILES

PHP code is split in multiple files for bigger programs. We use the includestatement to join various PHP files. 

<?php 

define("VERSION", 1.12);

function get_max($x, $y) {
    if ($x > $y) {
        return $x;
    } else {
        return $y;
    }
}

?>
Let's say, we have a common.php file, in which we define some constants and functions. 

<?php 

include "common.php";

echo "The version is " . VERSION . "\n";

$a = 5;
$b = 3;

echo get_max($a, $b), "\n";

?>
And we have another file, which wants to use the aforementioned definitions. 

include "common.php";
We simply include the definitions to our file with the include keyword. We must specify the exact path to the common.php file. In our simple case, both files are in the same directory. 
This chapter covered some basics of the PHP language.