Archive

Posts Tagged ‘PHP’

How to Use Tor Project Anonymous IP with Curl PHP on Linux

June 15th, 2010 1 comment

This article explains how to utilize Tor project in our own PHP application using Curl Library.

Tor is free software and an open network that helps you defend against a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security known as traffic analysis.

We start by installing and configuring Tor and the necessary software then we create a simple application that fetch a website address anonymously.

Read more…

  • Share/Bookmark

PHP Library to Connect to LDAP Server

This article describes a simple PHP library to connect to an LDAP server to manipulate user data inside. The user manipulation includes adding, updating, changing password, and deleting user account. To use the library, simply include it to a script that do the manipulation.

Read more…

  • Share/Bookmark

Finding Element in an Array of Arrays

The listed PHP function can be used to find an element of an array that are a member of other array. For example we have a data structure like this:

$data = array(
    array(
        "user_id" => "akhdaniel",
        "group_id" => 1
    ),
    array(
        "user_id" => "amir",
        "group_id" => 1
    ),
    array(
        "user_id" => "abyan",
        "group_id" => 1
    ),
    array(
        "user_id" => "ujang",
        "group_id" => 1
    )
);

Read more…

  • Share/Bookmark
Categories: PHP Tags: ,

Daftar Situs Penyedia E-Book IT

Mind boggling

Image by Andrei Z via Flickr

Berikut ini daftar beberapa situs yang menyediakan e-book seputar IT yang bisa didownload gratis. List ini senantiasa diupdate, jadi sebaiknya di-bookmark siapa tau perlu di kemudian hari. Jika anda punya situs e-book yang baik silahkan hubungi kami di halaman Contact.

 

Read more…

  • Share/Bookmark

How to change upload file size on a Windows localhost

In a localhost Apache + PHP it is easy to change the uploaded file size to something larger than the default 16M.

An example below show you how to change the upload file size to say 50M.

  • Locate the PHP.ini file, for example in c:/xampp/Apache/bin/php.ini and open it with any text editor like WordPad by right-clicking -> Open With -> then choose WordPad.

Read more…

  • Share/Bookmark

Joomla 1.5: Mengganti Footer

Edit file file sbb: Languages – en-GB.mod_footer.ini ganti baris berikut ini.

FOOTER=Footer
FOOTER_LINE1=Copyright © %date% %sitename%. All Rights Reserved.
FOOTER_LINE2=<a href="http://www.joomla.org">Joomla!</a> is Free Software released under the <a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU/GPL License.</a>
MOD_FOOTER=<em>mod_footer</em>
THIS MODULE SHOWS THE JOOMLA! COPYRIGHT INFORMATION=This Module shows the Joomla! Copyright information

Atau cara lainnya adalah pada file <yourtemplate>/index.php di bagian paling bawah ganti baris berikut ini.

<p id="power_by">
<?php echo JText::_(‘Powered by’) ?> <a href="http://www.joomla.org">Joomla!</a>.
<?php echo JText::_(‘Valid’) ?> <a href="http://validator.w3.org/check/referer">XHTML</a> <?php echo JText::_(‘and’) ?> <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>
</p>

Akhmad Daniel Sembiring

Ligarwangi.com – Linux, E-book, Coffee, Gift, etc
vITraining.com – Qualified IT Products, Outsourcing, and Services

  • Share/Bookmark

Portable Apache, MySQL, PHP

Pada kondisi dimana user minta bisa mencoba aplikasi yang kita bangun menggunakan WAMP (Windows Apache MySQL PHP) dan belum terdapat server komputer yang dapat kita installkan infrastruktur yang dibutuhkan, kita dapat menggunakan portable WAMP yang dapat dijalankan dari USB.

Kondisi lainnya adalah ketika kita ingin membuat versi trial aplikasi web kita ke calon customer.

Salah satu yang dapat digunakan adalah USB Webserver (http://www.usberbserver.nl).  Aplikasi ini berisi Apache, PHP, dan MySQL yang telah dikonfigurasi dan siap dijalankan sehingga kita tinggal mengisi aplikasi web yang akan kita demokan ke client.

Read more…

  • Share/Bookmark

CodeIgniter: koneksi ke port MySQL tertentu selain 3306

Secara default, database driver MySQL CodeIgniter konek ke port default MySQL yaitu 3306. Pada kondisi dimana port MySQL bukan 3306 misalnya 3307, CodeIgniter tidak punya option untuk menentukan pada port berapa MySQL berjalan.

Solusi untuk hal ini dapat dilakukan dengan beberapa cara:

  1. mengedit file driver database CodeIgniter: system/database/drivers/mysqli/mysqli_driver.php. Pada file ini dapat ditentukan port MySQL pada function ‘db_connect’ yaitu dengan menambahkan parameter $port pada function tsb:
    mysqli_connect
    ( [string $host [, string $username [, string $passwd [, string $dbname [, int $port [, string $socket]]]]]] )
  2. mengedit file PHP.INI, pada bagian  mysql.default_port, ganti dari 3306 menjadi 3307
  3. jika tidak punya akses ke file PHP.INI, bisa juga dicoba dengan mengedit file config/database.php nya CodeIgniter yaitu pada baris:
    $db['default']['hostname'] = "mysqlhost.yourdomain.com:3307";
  • Share/Bookmark

PHP Connection to PostgreSQL

Berikut ini langkah langkah yang perlu diperhatikan ketika membuat aplikasi PHP yang connect ke database PostgreSQL.

Function pg_connect

Langkah pertama adalah memanggil function pg_connect() untuk melakukan koneksi ke database server.

$dbconn = pg_connect ($conn_string);

Read more…

  • Share/Bookmark

MySQL Backup with phpMyBackupPro

phpMyBackupPro is a tool created using PHP programming language that can be used to perform backup and restore on MySQL database server. In this article we are going to learn how to install and configure this tool, perform manual backup and then perform restore the previously backed up database. We will also learn how to setup an automatic periodic backup using the same tool.

Installation

Installation of this tool is simple. Just download the newest version from http://www.phpmybackuppro.net/download.php.

After downloading, extract the zip file to a directory on your PHP and Apache web server accessible from browser, ie the Document Root, for example C:\XAMPP\HTDOCS. Then you will get a new folder under it, for example C:\XAMPP\HTDOCS\phpMyBackupPro.

That’s it! Now go to your web browser and point the URL of phpMyBackupPro, for example http://localhost/phpMyBackupPro.

Read more…

  • Share/Bookmark
This site uses a Hackadelic PlugIn, Hackadelic SEO Table Of Contents 1.6.0.