Showing posts with label Web. Show all posts
Showing posts with label Web. Show all posts

Menambah Kapasitas Limit File Upload di Apache

4:44 PM | , , , , , ,


Untuk menambah kapasitas limit file upload di webserver yang menggunakan apache maka kita harus mengubah file konfigurasi php.ini di komputer kita.

Langkah yang harus dilakukan
1. Buka file konfigurasi php.ini

sudo gedit  /etc/php5/apache2/php.ini
2. Setelah itu ubah konfigurasinya cari settingan memory_limit, upload_max_filesize dan post_max_sizenya.

memory_limit = 32M
upload_max_filesize = 10M
post_max_size = 20M
3. Restart apache

sudo service apache2 restart

Read More

Menampilkan Video pada Website Menggunakan Video-JS

12:48 PM | , , , , ,


<!DOCTYPE html>
<html>
<head>
  <title>Video.js | HTML5 Video Player</title>

  <!-- Chang URLs to wherever Video.js files will be hosted -->
  <link href="video-js.css" rel="stylesheet" type="text/css">
  <!-- video.js must be in the <head> for older IEs to work. -->
  <script src="video.js"></script>

  <!-- Unless using the CDN hosted version, update the URL to the Flash SWF -->
  <script>
    videojs.options.flash.swf = "video-js.swf";
  </script>


</head>
<body>

  <video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="640" height="264"
      poster="http://video-js.zencoder.com/oceans-clip.png"
      data-setup="{}">
    <source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
    <source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' />
    <source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
    <track kind="captions" src="demo.captions.vtt" srclang="en" label="English"></track><!-- Tracks need an ending tag thanks to IE9 -->
    <track kind="subtitles" src="demo.captions.vtt" srclang="en" label="English"></track><!-- Tracks need an ending tag thanks to IE9 -->
  </video>

</body>
</html>

Plugin video-js bisa anda download di sini atau di sini.
Read More

Tutorial phpCAS di Linux

9:37 AM | , , , , , ,

Apa itu phpCAS ? silakan baca di sini

Langkah-langkah menginstal phpCAS
1. Jika anda belum menginstal php-pear di komputer anda maka instal terlebih dahulu
sudo apt-get install php-pear
2. Lalu jalankan perintah di bawah ini
sudo pear install  http://downloads.jasig.org/cas-clients/php/current.tgz
3. Setelah instalasi selesai maka phpCAS sudah bisa digunakan
4. Untuk memahami cara penggunaan phpCAS anda bisa menggunakan script berikut lalu di simpan ke file config.php


/**
 * The purpose of this central config file is configuring all examples
 * in one place with minimal work for your working environment
 * Just configure all the items in this config according to your environment
 * and rename the file to config.php
 *
 * PHP Version 5
 *
 * @file     config.php
 * @category Authentication
 * @package  PhpCAS
 * @author   Joachim Fritschi <jfritschi@freenet.de>
 * @author   Adam Franco <afranco@middlebury.edu>
 * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
 * @link     https://wiki.jasig.org/display/CASC/phpCAS
 */
$phpcas_path = '/usr/share/php';
///////////////////////////////////////
// Basic Config of the phpCAS client //
///////////////////////////////////////
// Full Hostname of your CAS Server
$cas_host = 'sso.sample.com';
// Context of the CAS Server
$cas_context = '/cas/';
// Port of your CAS server. Normally for a https server it's 443
$cas_port = 443;
// Path to the ca chain that issued the cas server certificate
//$cas_server_ca_cert_path = '/path/to/cachain.pem';
//////////////////////////////////////////
// Advanced Config for special purposes //
//////////////////////////////////////////
// The "real" hosts of clustered cas server that send SAML logout messages
// Assumes the cas server is load balanced across multiple hosts
$cas_real_hosts = array('cas-real-1.example.com', 'cas-real-2.example.com');
// Database config for PGT Storage
$db = 'pgsql:host=localhost;dbname=phpcas';
//$db = 'mysql:host=localhost;dbname=phpcas';
$db_user = 'phpcasuser';
$db_password = 'mysupersecretpass';
$db_table = 'phpcastabel';
$driver_options = '';
///////////////////////////////////////////
// End Configuration -- Don't edit below //
///////////////////////////////////////////
// Generating the URLS for the local cas example services for proxy testing
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
    $curbase = 'https://' . $_SERVER['SERVER_NAME'];
} else {
    $curbase = 'http://' . $_SERVER['SERVER_NAME'];
}
if ($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) {
    $curbase .= ':' . $_SERVER['SERVER_PORT'];
}
$curdir = dirname($_SERVER['REQUEST_URI']) . "/";
// CAS client nodes for rebroadcasting pgtIou/pgtId and logoutRequest
$rebroadcast_node_1 = 'http://cas-client-1.example.com';
$rebroadcast_node_2 = 'http://cas-client-2.example.com';
// access to a single service
$serviceUrl = $curbase . $curdir . 'example_service.php';
// access to a second service
$serviceUrl2 = $curbase . $curdir . 'example_service_that_proxies.php';
$pgtBase = preg_quote(preg_replace('/^http:/', 'https:', $curbase . $curdir), '/');
$pgtUrlRegexp = '/^' . $pgtBase . '.*$/';
$cas_url = 'https://' . $cas_host;
if ($cas_port != '443') {
    $cas_url = $cas_url . ':' . $cas_port;
}
$cas_url = $cas_url . $cas_context;
// Set the session-name to be unique to the current script so that the client script
// doesn't share its session with a proxied script.
// This is just useful when running the example code, but not normally.
session_name(
    'session_for:'
    . preg_replace('/[^a-z0-9-]/i', '_', basename($_SERVER['SCRIPT_NAME']))
);
// Set an UTF-8 encoding header for internation characters (User attributes)
header('Content-Type: text/html; charset=utf-8');

nb. perintah yg ditebalkan diubah sesuai setting di server sso yang akan kita tuju.

5. Buat file script_info.php yang berisi perintah berikut

<?php
/**
 *  Small script to add some info about the example script that is running.
 *  Adds some info that makes it easier to distinguish different proxy sessions
 *
 * PHP Version 5
 *
 * @file     script_info.php
 * @category Authentication
 * @package  PhpCAS
 * @author   Joachim Fritschi <jfritschi@freenet.de>
 * @author   Adam Franco <afranco@middlebury.edu>
 * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
 * @link     https://wiki.jasig.org/display/CASC/phpCAS
 */ ?>
    <dl style='border: 1px dotted; padding: 5px;'>
      <dt>Current script</dt><dd><?php print basename($_SERVER['SCRIPT_NAME']); ?></dd>
      <dt>session_name():</dt><dd> <?php print session_name(); ?></dd>
      <dt>session_id():</dt><dd> <?php print session_id(); ?></dd>
    </dl>

6. Terakhir buat file utama untuk mendapatkan otentikasi dan informasi dari sso server. Contoh

<?php
/**
 *   Example for a simple cas 2.0 client
 *
 * PHP Version 5
 *
 * @file     example_simple.php
 * @category Authentication
 * @package  PhpCAS
 * @author   Joachim Fritschi <jfritschi@freenet.de>
 * @author   Adam Franco <afranco@middlebury.edu>
 * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
 * @link     https://wiki.jasig.org/display/CASC/phpCAS
 */
// Load the settings from the central config file
require_once 'config.php';
// Load the CAS lib
require_once $phpcas_path . '/CAS.php';
// Uncomment to enable debugging
phpCAS::setDebug();
// Initialize phpCAS
phpCAS::client(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
// For production use set the CA certificate that is the issuer of the cert
// on the CAS server and uncomment the line below
// phpCAS::setCasServerCACert($cas_server_ca_cert_path);
// For quick testing you can disable SSL validation of the CAS server.
// THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
// VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
phpCAS::setNoCasServerValidation();
// force CAS authentication
phpCAS::forceAuthentication();
// at this step, the user has been authenticated by the CAS server
// and the user's login name can be read with phpCAS::getUser().
// logout if desired
if (isset($_REQUEST['logout'])) {
phpCAS::logout();
}
// for this test, simply print that the authentication was successfull
?>
<html>
  <head>
    <title>phpCAS simple client</title>
  </head>
  <body>
    <h1>Successfull Authentication!</h1>
    <?php require 'script_info.php' ?>
    <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
    <p>phpCAS version is <b><?php echo phpCAS::getVersion(); ?></b>.</p>
    <p><a href="?logout=">Logout</a></p>
  </body>
</html>

7. Jalankan program namun jangan lupa alamat domain anda harus sudah terdaftar pada sso server

Selamat mencoba :)

Read More

Instal Compozer Laravel 4

12:51 PM | , , , , , , ,


Apa itu Laravel?
Bagi yang belum tahu Laravel itu adalah salah satu framework aplikasi web berbasis PHP. Untuk mengetahui lebih lanjut tentang Laravel dapat dibaca di sini.

Nah sebelum menggunakan framework Laravel rekan-rekan bisa mendownload master Laravel di repository master laravel di github.

Setelah itu akan kami bahas bagaimana cara menginstal Compozer. Apa itu kompozer bisa di baca di sini. Namun sekedar informasi bahwa untuk menginstal laravel dengan mudah maka kita harus terlebih dahulu menginstal compozer.

Untuk menginstal compozer langkah yang harus dilakukan sebagai berikut.
Download compozer dengan menggunakan curl dengan perintah berikut ini
curl -sS https://getcomposer.org/installer | php
sebelumnya bisa diinstal dulu curl jika anda pengguna linux ubuntu maka anda cukup mengteikan perintah berikut atau mendownload source-nya di sini
apt-get install php5-curl
jika anda pengguna windows maka anda bisa melihat tutorialnya di sini. 
atau jika belum menginstal curl maka bisa menggunakan perintah berikut
php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"
setelah itu instal compozer dengan perintah berikut
curl -sS https://getcomposer.org/installer | php -- --install-dir=[instal_dir]
silahkan ganti instal dir dengan direktori /usr/local/bin
atau jika gagal gunakan perintah memindah file compozer secara manual ke local bin tetapi untuk perintah di atas untuk  -- --install-dir dihapus.
mv composer.phar /usr/local/bin/composer
Oke sampai sini tahap menginstal compozer selesai ^_^







Read More

Fungsi - Fungsi String di PHP

9:48 PM | , , , , , , ,

Ditulis yukk biar gak lupa... :)

strlen()
Digunakan untuk menghitung jumlah karakter dalam suatu variable, syantax-nya sebagai berikut : strlen($namavariable)
contoh:
$kalimat="Belajar PHP";
$jumlah=strlen($kalimat);
print "variable string \$kalimat=$kalimat
";
print "Kalimat '$kalimat' diatas jumlah karakternya adalah $jumlah";
?>

strpos()
Berguna untuk mengetahui posisi suatu karakter pada sebuah variable string, Anda bisa menuliskannya dengan syntax berikut : strpos($namavariable_string, $karakter)
contoh:
$kalimat="Pemograman PHP";
$karakter="m";
$posisi=strpos($kalimat,$karakter);

print "Karakter '$karakter' berada pada posisi ke $posisi dalam kalimat '$kalimat'
";
?>


Fungsi untuk merubah huruf kapital
Untuk merubah huruf pada variable string menjadi besar semua, Anda dapat menggunakan fungsi: strtoupper("datastring)
Sedangkan unuk mengubah menjadi huruf kecil semua dapat mengunakan fungsi : strtolower("datastring")
contoh
$kalimat="Juara liga Indonesia 2006 adalah persik Kediri";
print "Kalimat awal adalah :
";
print "$kalimat

";
$ubah1=strtoupper($kalimat);
print "Kalimat diatas diubah menjadi huruf besar semua menjadi :
";
print "$ubah1

";
$ubah2 = strtolower($kalimat);
print "Kalimat diatas diubah menjadi huruf kecil semua menjadi :
";
print "$ubah2
";
?>


Jika Anda ingin merubah huruf peratama saja dalam suatu string maka bisa menggunakan fungsi berikut : ucfirst("data_string")
Untuk merubah huruf pertama saja dalam suatu kata dalam suatu string dapat menggunakan fungsi berikut : ucwords("data_string")
contoh
$kalimat= "belajar pemograman web dengan PHP";
print "Kalimat awal adalah '$kalimat'

";
$ubah1 =ucfirst($kalimat);
print "Setelah dirubah kapital huruf awalnya saja menjadi :
";
print $ubah1 ."

";
$ubah2 = ucwords($kalimat);
print "Setelah dirubah menjadi kapital perkata menjadi :
";
print $ubah2 ;
?>

Cara menghilangkan spasi dalam variable string
Jika Anda ingin mengubah posisi spasi pada suatu variable string, Anda dapat menggunakan fungsi-fungis berikut
1. rtrim("data_string"), untuk menghilangkan spasi yang ada di kanan string
2. ltrim("data_string"), untuk menghilangkan spasi yang ada di kiri string
3. trim(("data_string"), untuk menghilangkan spasi yang ada di kanan dan kiri string

Contoh penggunaan fungsi-fungsi diatas adalah sebagai berikut
$kata=" Program PHP "; // Perhatikan pada bagian awal dan akhir mengandung spasi satu ketuk
print "Kata '$kata' dengan spasi didepan dan dibelakang
";
$hilang1=ltrim($kata);
print "Dihilangkan spasi didepan menjadi :
";
print "'$hilang1'

";
$hilang2=rtrim($kata);
print "Dilihlangkan spasi dibelakang menjadi :
";
print "'$hilang2'

";
$hilang3=trim($kata);
print "Dilihlangkan spasi didepan dan dibelakang menjadi :
";
print "'$hilang3'

";

?>


Cara merubah variable string menjadi variable string baru yang diinginkan
Gunakan fungsi substr() untuk merubah variable string sesuai keinginan Anda
syntax-nya substr("data_string", posisi_awal, banyaknya_karakter)
Keterangan paramater dalam syntax substr():
data_string = adalah string kata atau kalimat atau karakter apapun berupa string yang ingin Anda rubah
posisi_awal    = adalah angka(bukan huruf) yang menunjukkan pada posisi keberapa Anda ingin merubah string
banyaknya_karakter = adalah angka(bukan huruf) yang menunjukkan banyaknya karakter yang ingin Anda rubah
contoh:
$kata="abcdefgh";
print "Variable \$kata = '$kata' dirubah menjadi string baru sebagai berikut :

";
echo substr($kata, 2) . "  --> menggunakan fungsi substr(\$kata, 2)
";
echo substr($kata, 3,2) . "  --> menggunakan fungsi substr(\$kata, 3,2)
";
echo substr($kata, 0,6) . "  --> menggunakan fungsi substr(\$kata, 0,6)
";
echo substr($kata, -3,2) . "  --> menggunakan fungsi substr(\$kata, -3,2)
";
?>

Fungsi substring_count()
Berguna untuk menghitung jumlah kata(atau beberapa karakter) dalam sebuah string, syntax-nya sebagai berikut : substr_count("data_string", "karakter_yg_dicari")
untuk lebih jelasnya perhatikan contoh berikut ini :
$kalimat = "PHP merupakan bahasa pemograman web dinamis. Bahasa PHP cukup mudah dipelajari, dan PHP free";
$jumlah    = substr_count($kalimat, "PHP");
print "Kalimat berikut ini
'$kalimat'

";
print "Jumlah kata 'PHP' dalam kalimat diatas adalah : $jumlah";
?>
untuk tambah  lebih jelasnya lagi perhatikan contoh berikut ini:
$kata2=array("ex","te","xt","ek");
$lihat= "text text text text text text text text";
foreach($kata2 as $kw){
echo "Kata $kw terlihat ". substr_count($lihat,$kw) . "
";
}
?>


Membuat String Berulang
Untuk membuat string berulang, Anda bisa menggunakan fungsi berikut :str_repeat("yang_akan_ulang", banyaknya_pengulangan)
Contoh :
$ulang = str_repeat("selamat", 4);
print "Anda telah berhasil belajar PHP, $ulang";
?>

Mengganti Bagian Dari String
Untuk mamnipulasi data string kadang Anda perlu untu mengganti bagian tertentu dari string dengan nilai string lainnya. Anda dapat menggunakan fungsi berikut : str_replace("yg_diganti", "pengganti", "kalimat")
parameter yg_diganti adalah string yang akan digantikan oleh string yang menggantikan
parameter pengganti adalah string yang akan menggantikan string yang digantikan
parameter kalimat adalah string awal yang berisi kalimat asli yang nantinya akan digantikan
contoh:
$kata1="Belajar PHP sangat susah yaaa !";
$ubah= str_replace("susah", "mudah", $kata1);
print "Kalimat '$kata1'
akan diganti menjadi :
";
print $ubah;
?>


Memecah String
String dapat dipecah menjadi beberapa bagian, untuk memecah string perkata Anda dapat menggukanan fungsi berikut : strtok("string_yg_akan_dipecah", "karakter_pemisah")
parameter karakter_pemisah bisa diisi dengan spasi kosong atau karakter apapun
contoh
$kalimat = "di wwww.agiptek.com ada tutorial PHP yang cukup lengkap untuk jadi rujukan bagi pemula programmer PHP";
$pecah    = strtok($kalimat, " ");
while ($pecah){
print "$pecah
";
$pecah = strtok(" ");
}
?>



sumber : http://agiptek.com/index.php/php/114-beberapa-fungsi-pengolah-string.html
Read More

Gunakan Konsole Linux menjadi Browser

11:27 AM | , , , , , ,


Apa yang Anda lihat dari gambar di atas?
Yupz saya sedang mengakses facebook dari sebuah konsole linux. Bagaimana caranya?

Singkat saja Anda cuma butuh  2 langkah untuk melakukan seperti apa yang saya lakukan di atas.

Pertama, Instal aplikasi w3m di linux Anda dengan mengetikan perintah
sudo apt-get install w3m

Kedua, buka alamat web yang ingin Anda kunjungi dengan perintah
w3m www.google.com

Dan akan keluar tampilan seperti berikut



Untuk memasukan inputan text pada halaman web Anda cukup menekan enter pada text yang berwarna merah lalu isikan apa yang ingin Anda tulis. Lalu tekan enter lagi maka akan tertulis pada textbox web seperti pada gambar di atas.
Untuk keluar dari w3m Anda cukup menekan tombol Ctrl+z

Selamat mencoba ^_^
Read More

Membuat Virtual Host di Ubuntu

4:37 PM | , , , , , , ,

Untuk membuat sebuah virtual host di Ubuntu lakukan langkah-langkah berikut ini:

1. Ubah file konfigurasi default site pada server apache

sudo gedit /etc/apache2/sites-available/default
   Lalu tambahkan perintah berikut pada baris paling bawah

<VirtualHost *:80>
      ServerName namaserver.com
      DocumentRoot /var/www/lokasi_file_website
      <Directory /var/www/lokasi_file_website>
             Options Indexes FollowSymLinks MultiViews
             AllowOverride AuthConfig FileInfo
             Order allow,deny
             allow from all
       </Directory>
</VirtualHost>

2. Tambahkan nama domain virtual host pada file /etc/hosts
sudo gedit /etc/hosts
    Lalu sisipkan perintah berikut di bawah localhost
127.0.0.1   namaserver.com

3. Restart Apache
sudo service apache2 restart
4. Coba jalankan pada browser dengan mengetikan namaserver.com pada address bar

Read More

Install Laravel in ubuntu varian

8:59 PM | , , , , , , , ,

Requirements

  • Apache, nginx, or another compatible web server.
  • Laravel takes advantage of the powerful features that have become available in PHP 5.3. Consequently, PHP 5.3 is a requirement.
  • Laravel uses the FileInfo library to detect files' mime-types. This is included by default with PHP 5.3. However, Windows users may need to add a line to their php.ini file before the Fileinfo module is enabled. For more information check out the installation / configuration details on PHP.net.
  • Laravel uses the Mcrypt library for encryption and hash generation. Mcrypt typically comes pre-installed. If you can't find Mcrypt in the output of phpinfo() then check the vendor site of your LAMP installation or check out the installation / configuration details on PHP.net.

Installation


  1. Download Laravel
  2. Extract the Laravel archive and upload the contents to your web server.
  3. Set the value of the key option in the config/application.php file to a random, 32 character string.
  4. Verify that the storage/views directory is writable.
    You can use chmod option like this
    #chmod a+w your_path/storage/views  -R
  5. Navigate to your application in a web browser. http://localhost/laravel/public
Read More

Install Yamli Arabic Keyboard plugin to Google Chrome

9:04 PM | , , ,

Setelah sebelumnya saya posting artikel tentang bagaimana menginstal Yamli menjadi add on di firefox (baca tulisan saya sebelumnya : install yamli smart arabic keyboard-addon firefox). Maka sekarang saya akan menuliskan langkah-langkah untuk menginstal plugin yamli di browser google chrome.

Buka browser chrome anda lalu masuk ke alamat https://chrome.google.com/webstore/detail/yamli-for-chrome/jhninijcbcniklnjbohdmoglogfjbglh maka akan muncul Chrome Web Store seperti pada gambar berikut ini.

Setelah itu klik pada tombol Add to chrome lalu muncul konfirmasi seperti pada gambar berikut dan klik tombol add untuk melanjutkan.















Yamli siap digunakan dengan klik pada tombol add on yamli pada barisan tombol pojok kanan atas      browser chrome anda
Read More

13 Template Web Keren

3:41 PM | ,


Info template-template ini ane dapat dari http://www.kaskus.co.id/thread/509ee01c621243ef4a000020

Oke deh biar nggak penasaran langsung aja dilihat.

  1. Synergy - Responsive & Interactive HTML Portfolio

        Screenshoot:

        Preview Link: http://themes.mediacreed.com/html/synergy/#portfolio.html
     
  2. Crevision - Responsive HTML Template

        Screenshoot:

        Preview Link: http://themes.jozoor.com/crevision/dark/index.html
     
  3. SmartStart - Responsive HTML5 Template

        Screenshoot:

        Preview Link: http://demo.samuli.me/smartstart/
     
  4. CRISP - Responsive HTML5 Template

        Screenshoot:

        Preview Link: http://www.aetherdesign.net/demo/crisp/index.html
     
  5. SCRN - Responsive Parallax Template

        Screenshoot:

        Preview Link: http://rodrigob.com/themes/scrn/#intro
     
  6. MoonCake - Responsive Admin Template

        Screenshoot:

        Preview Link: http://www.malijuthemeshop.com/live_previews/mooncake/creative/dashboard.html
     
  7. Centum - Responsive HTML Template

        Screenshoot:

        Preview Link: http://vasterad.com/themes/centum/index.html
     
  8. Developr - Fully Responsive Admin Skin

        Screenshoot:

        Preview Link: http://www.display-inline.fr/demo/developr/
     
  9. Supr - Responsive Admin Template

        Screenshoot:

        Preview Link: http://themes.suggeelson.com/supr/dashboard.html?username=Administrator&password=somepass
     
  10. Showroom Portfolio Responsive HTML5 Theme

        Screenshoot:

        Preview Link: http://demo.themedev.me/site_templates/showroom/home.html
     
  11. FluidApp - Responsive Mobile App Website Template

        Screenshoot:

        Preview Link: http://themes.two2twelve.com/site/fluidapp/dark/
     
  12. Gebo Admin Responsive Template

        Screenshoot:

        Preview Link: http://tzd-themes.com/gebo_admin/index.php?uid=1&page=dashboard
     
  13. Vertigo - Responsive HTML Template

        Screenshoot:

        Preview Link: http://demo.brankic.net/vertigohtml/light/
     
Read More

Cara cepat download lewat 4shared tanpa login

3:38 PM | , ,

Kalo temen2 mau download file lewat 4shared harus ribet login segala. Nah sekarang ada situs penyedia link generator 4shared jadi kita gak perlu lagi deh repot2 login.

Alamatnya dimana?

Oke masuk ke link http://www.4server.info/
abis itu copy link download  4shared file yang mau kamu download misalnya :
http://www.4shared.com/office/uqjzZDR1/EXPERT_SYSTEM.html
nah abis itu paste ke textbox dan klik tombol generate link di sampingnya. (lihat gambar di bawah)



terus copas alamat link hasil generatenya.... dan slihakan disedot tuh filenya
selamat mencoba :)


 
Read More

Tips and Tricks About MySQL

2:47 PM | , , , , , , , ,


Hi guys, long time no post again about programming. Now I will share you about some tricks on mysql. I hope this was useful for you. Okay let's see the code

1. Reindexing an Auto Increment Id

ALTER TABLE yourtable ADD COLUMN id2 INT(11) UNSIGNED  NOT NULL AFTER `id`;     SET @a:=0;                                                                      UPDATE yourtable SET id2=@a:=@a+1 ORDER BY id;                                   ALTER TABLE yourtable DROP id;                                                  ALTER TABLE yourtable CHANGE id2 id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,   ADD PRIMARY KEY(id);

2. Make a zerofill on the field value

CREATE TABLE yourtable (x INT(8) ZEROFILL NOT NULL, y INT(8) NOT NULL);
INSERT INTO yourtable (x,y) VALUES
(1, 1),
(12, 12),
(123, 123),
(123456789, 123456789);
SELECT x, y FROM yourtable;

Read More