SSH MySql Optimization

This is for Mysql Server Optimization. This is can use for server with 1GB RAM. This all command for SSH/ shell connection

First : Login to your SSH root

We must edit /etc/my.cnf for optimize Mysql
backup first your my.cnf

# cp /etc/my.cnf /etc/my.cnf.old

Edit file use nano:

# nano /etc/my.cnf

If your server do not have nano function, you can install it with this :

# yum install nano

Then erase all and replace with this code : Continue Reading

Incoming search terms for the article:

mysql optimize ssh, optimization kloxo, Optimization & mysqld 1Gb RAM, mysql ssh optimize connection commands, mysql ssh optimize, 1gb mysql ssh, mysql optimization ppt, mysql optimization kloxo, my cnf ssh mysql, kloxo optimize mysql

php for save to excel xls file

This is how we can save our php work to microsoft excel file .xls.
This is the code :

<?
// Connect database.
mysql_connect("localhost","user_db","db_password");
mysql_select_db("db_name");

// Get data records from table.
$result=mysql_query("select * from reseller ");

// Functions for export to excel.
function xlsBOF() {
echo pack("ssssss", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);
return;
}
function xlsEOF() {
echo pack("ss", 0x0A, 0x00);
return;
}
function xlsWriteNumber($Row, $Col, $Value) {
echo pack("sssss", 0x203, 14, $Row, $Col, 0x0);
echo pack("d", $Value);
return;
}
function xlsWriteLabel($Row, $Col, $Value ) {
$L = strlen($Value);
echo pack("ssssss", 0x204, 8 + $L, $Row, $Col, 0x0, $L);
echo $Value;
return;
}
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");;
header("Content-Disposition: filename=mycustomer.xls ");
header("Content-Transfer-Encoding: binary ");

xlsBOF();

/*
Make a top line on your excel sheet at line 1 (starting at 0).
The first number is the row number and the second number is the column, both are start at '0'
*/

xlsWriteLabel(0,0,"List of My customer");

// Make column labels. (at line 3)
xlsWriteLabel(2,0,"No.");
xlsWriteLabel(2,1,"First Name");
xlsWriteLabel(2,2,"Last Name");
xlsWriteLabel(2,3,"Address");
xlsWriteLabel(2,4,"Email");
$xlsRow = 3;

// Put data records from mysql by while loop.
while($row=mysql_fetch_array($result))
{
xlsWriteNumber($xlsRow,0,$row['user_id']); // create number
xlsWriteLabel($xlsRow,1,$row['first_name']);
xlsWriteLabel($xlsRow,2,$row['last_name']);
xlsWriteLabel($xlsRow,3,$row['address']);
xlsWriteLabel($xlsRow,4,$row['email']);
$xlsRow++;
}
xlsEOF();
exit();
?>

With this code :
you will save new xls file named : mycustomer.xls
You can use and modify it for your own purpose.
Tuppy free photo sharing site

Incoming search terms for the article:

save xlswritelabel, echo pack php to generate excel, excelxlsfile php, how to write excel file with php, Internal Server Error excel php, php and xlsWriteNumber and image, xlsWriteLabel how to save

Learn to create script use CodeIgniter

I get CodeIgniter from my friend. With CodeIgniter we can build PHP script. In codeIgniter, much php function has been included, so we get more easier to build PHP script. But, I still learn about codeigniter, and this is complete script that using codeigniter engines. Script named is Tarachi. You can download this file at SourceForge. For official website of Tarachi, It was not actived. We can learn it from that script about codeigniter.

shareware, freeware, software, application, free software downloads are all you can search and get it on internet using google search engine or yahoo search engine, both are the best for me.
Continue Reading

Incoming search terms for the article:

learn codeigniter

Form validate input when submitted

This is sample for form validate input.

This is sample for form that we want to validate input, input must filled.

First Name: Last Name:

At this form, we want to input FirstName and LastName must be filled before next process.

Continue Reading

function for check mobile browser

This is function for check our visitor browser, use mobile browser from his phone, ipod, or other mobile technology.

We can redirect visitor that use mobile browser for make our website mobile friendly.

This is the function :
Continue Reading

Incoming search terms for the article:

checkmobile php, function checkmobile(){, check_mobile php, function checkmobile, php checkmobile() function to detect mobile device, php check_mobile(), php function check_mobile, php function detection mobile blackberry, check mobile browser php function, preg_match(\/2 0 mmp|240x320|400x240|android|avantgo|blackberry|blackberry9530|blazer|cellphone|compal|danger|docomo|elaine|eudora|fennec|googlebot|hiptop|htc|htc_|iemobile|ip(hone|od)|iris|jb5|kindle|kyocera|lg\-tu915 obigo|lg\/u990|lge |lge vx|maemo|mid

How to make wordpess search permalink different with others

Default wordpress  search permalink is www.domain.com/search/search+this

For make different with other or modify the default, you can use this way.

We can change search permalink like this : www.domain.com/topics/search+this

For make this, we must edit file rewrite.php. We can find this file at folder : wp-includes

Edit file : rewrite.php

Continue Reading

Incoming search terms for the article:

$search_base = search;, change rewrite php search permalink, change search permalink, var $search_base = search; wordpress, var $search_base = ‘search’;, wordpress $search_baser, wordpress search_base

How to optimize your Mysql database

optimize your Mysql database, I think this useful for our database.  This is simple way to optimize your Mysql databases

First, login to your cPanel or Kloxo or other admin panel. Go to your phpmyadmin of your database that you want to optimize.

At your phpmyadmin, you can see your database tabel like this. At your phpmyadmin if you see your table databases like this, you can get optimize

Continue Reading

Incoming search terms for the article:

optimise mysql image

We can run our PHP script in our own computer

In php script, we talk about website programming. For the PHP, we can use mathematics method like add, divide, subtract or multiple number. In php we can use database, usually use Mysql databases. We can make php condition for save it to databases.

But… sometimes our php condition that we have been created was false so our website display error. For know that error before we upload the php script to our online hosting, we can check it first at our own computer.

Continue Reading

Create Mysql Databases at Kloxo Admin Panel

At Kloxo admin panel, for create mysql database almost same with cPanel. Inside Kloxo admin, click MySql databases at Tab Resources. Then click tab Add Mysql Database.

Fill the form.

Db Name : (Database name) Fill this with your database and also become your User database name
Password and retype password : is your user database password. After we create fill that and create, our new database and user database has been created.

At kloxo, database name and user database is not same with cPanel. At cPanel, our database name will become : cpanelUser_DatabaseName.
At Kloxo our database name same with we created : DatabaseName (without KloxoUser)

Incoming search terms for the article:

kloxo database, kloxo add database, create database kloxo, how to create database in kloxo, kloxo create mysql, kloxo create database, how to create a database in kloxo, kloxo create mysql database, add database kloxo, kloxo database users

Insert banner / ads between wordpress posting

we can place ads/ banner between posting 1 and 2 or 2 and 3 or inside the post.
For add the banner code :
First : Edit your theme, Find at index.php the wordpress code :

<?php if (have_posts()) : ?>

Add this code below that WP code :

<? $itest = 0; ?>

For add your ads/banner code : find WP code :

<?php while (have_posts()) : the_post(); ?>

And place below that this code:

<? if ( $itest == 1)
{
?>
<p align="left" style="padding-bottom:8px">
Insert here your ads/banner code
</p>
<?
}
else if ( $itest == 2)
{
?>
<p align="left" style="padding-bottom:8px">
Again if you want to place between post 2 and 3
</p>
<?
}
?>

You can add as much you want to place the ads/banner.

For add banner inside the post, you just find this code :

<h2><a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></a></h2>

Continue Reading

Incoming search terms for the article:

ads between wordpress -posts, code ads wordpress, wordpress index template ads banners between posts four, wp banners between posts