Installation NginX on Windows

Posted by Rahman M On Monday, August 26, 2013 4 comments

Nginx is one of the web servers are already widely used and increasingly compete with the Apache web server, given the already widely used, the following I give a little tutorial on Nginx install on windows.
Download Nginx from this link and PHP from this link.

Extract Nginx in folder C:\, then extract PHP in folder C:\nginx to be C:\nginx\PHP.
Nginx on windows may not run automatically through service windows, for that we will make the script so that nginx can run automatically when Windows is running.
First, we will create a script that can be run automatically nginx.
open notepad, then type the following script:
cd c:\nginx\
echo Starting Nginx...
start /B cmd /K "c:\nginx\nginx.exe"
echo Start Php-cgi...
start /B cmd /K "c:\nginx\php\php-cgi.exe -b -c c:\nginx\php\php.ini"
ping >NUL
then save it as a start-nginx.bat

next we will create a script to stop nginx.
open notepad and type the following script:

Taskkill /F /im nginx.exe
Taskkill /F /im php-cgi.exe
then save it as a stop-nginx.bat

up to this point has been able to run nginx automatically using windows or startup schedule, but when run CMD command window will appear. to hide the CMD command make the following script.
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "start-nginx.bat" & Chr(34), 0
Set WshShell = Nothing
then save it as a start-nginx.vbs

try to run the start-nginx.vbs, if not visible CMD command means write the code is correct. then you can create a startup on Windows.

good luck ...


Add data to a Sqlite database

Posted by Rahman M On Friday, August 17, 2012 1 comments

In the previous post I have given way to connect to a sqlite database through delphi.
this time we will enter data into a sqlite database
made form as shown below.

code as shown below.

unit Unit1;


  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, ZAbstractRODataset, ZAbstractDataset, ZDataset, ZConnection,
  ComCtrls, StdCtrls, Buttons, ExtCtrls, Grids, DBGrids;

  TForm1 = class(TForm)
    ZConnection1: TZConnection;
    Query1: TZQuery;
    GroupBox1: TGroupBox;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    dtp1: TDateTimePicker;
    Bevel1: TBevel;
    BitBtn1: TBitBtn;
    DataSource1: TDataSource;
    DBGrid1: TDBGrid;
    Query2: TZQuery;
    procedure FormActivate(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
    { Private declarations }
    { Public declarations }

  Form1: TForm1;


{$R *.dfm}

procedure TForm1.BitBtn1Click(Sender: TObject);
//query to insert data
with Query1 do
  SQL.Text:='Insert into empl_list(empl_id,empl_name,birthday)values('+QuotedStr(Edit1.Text)+','+QuotedStr(Edit2.Text)+','+QuotedStr(FormatDateTime('yyyy-mm-dd',dtp1.Date))+')';
//query to fetching data
with Query2 do
  SQL.Text:='Select empl_id,empl_name,birthday from empl_list';

procedure TForm1.FormActivate(Sender: TObject);
//connection properties
ZConnection1.Database:=ExtractFilePath(Application.ExeName) + '\employee.sdb';

//check connection
{if ZConnection1.Connected=true then
  Application.MessageBox('connection successfully done','Checking connection',MB_ICONINFORMATION);
  Application.MessageBox('connection failed','Checking connection',MB_ICONSTOP); }

do compile and enter data, then click the Add button.
if no errors will appear as shown below.

This can be used also to connect to mysql server with a few changes that you will get the next post.

6 ways to improve google pagerank

Posted by Rahman M On Tuesday, August 14, 2012 6 comments

I'll share how to increase google page rank of your website.
I take these tips from a blog that discussed the google page rank.
and I'm sure if you follow these tips, then google page rank of your website will quickly rise.

  • Write an article relevant to the content or according to the theme of your blog title. Do not have to follow to write more articles that your blog is hot but not related to the topic. For instance the theme of learning blog seo blog, but even then writing Love Words of Wisdom. The solution if you want high traffic is better to make a new blog topic Top News Online.
  • Exchange links with fellow bloggers. After doing a link exchange with fellow bloggers, the value of your blog page rank will rise faster.
    Please note you are not picky about the blog that will be invited to exchange links. Due to the new blog if it turns out that even with good care and have a PR blog is up, it will be good for your blog because your blog is considered outbound link quality.
  • Link your blog to writing and the other dummy blog / quality blogfarm yours. in addition to link dummy link to the blog, you should also do a link exchange with blogs that already have high PR and traffic. Optimize your dummy blog to provide backlinks to link the quality of your dummy.
  • Do not often change the blog template. When you are new to optimize your blog, you should not frequently change the template, because when you are replacing theme will confuse the google robot while doing his job.
  • Perform periodic updates. By constantly updating the article on your blog, will give a plus for your blog because it is not considered a farm blog is only to be bred as a dummy blog.
  • Commenting on Dofollow Blog. but commented on the blog nofollow is also good to increase blog traffic and reinforce the value of Page Rank of your blog.     
I hope the above tips can be useful for you to improve your google pagerank on your website.

About Alexa

Posted by Rahman M On 1 comments
Alexa Internet, Inc. is a California-based company that operates a site that provides information on the number of visitors to the site and order.

Alexa Internet was founded in 1996 by Brewster Kahle and Bruce Gilliat.

You will find out the status of your website through made ​​by alexa ranking.
To facilitate monitoring in alexa ranking, you need a widget that can be downloaded on the official website

Advertiser liked the website with a good alexa ranking, for you are involved in internet marketing you need to how to improve alexa ranking.

in the next post I will discuss how to improve alexa ranking.

Delphi connection to Sqlite with Zeos

Posted by Rahman M On Friday, August 10, 2012 7 comments
There are many Delphi components that can be used to interact with sqlite, one of the most popular is the ZEOS. It can be used for sqlite, ZEOS also be used to interact with some of the big servers like Oracle, MySQL, PostgreSQL and many more.

download first sqlite3.dll here and place it on the main project folder.

you can download the latest version of ZEOS here.
I assume you've installed ZEOS in delphi. here I am using Delphi 2009.
Now open your Delphi and create a new project and add components ZEOS,
TZConnection and TZQuery like this picture below.


double-click on the event onActivate Form1 and insert the following code.

procedure TForm1.FormActivate(Sender: TObject);
ZConnection1.Database:=ExtractFilePath(Application.ExeName) + '\coba.sdb';

//check connection
if ZConnection1.Connected=true then
  Application.MessageBox('connection successfully done','Checking connection',MB_ICONINFORMATION);
  Application.MessageBox('connection failed','Checking connection',MB_ICONSTOP);

do compile and see if we write code that worked?
yes, it should work like the image below.

in the next post we will add the data and view data in sqlite using the DBGrid. 

Manage Sqlite database with Sqlite Studio

Posted by Rahman M On Tuesday, August 7, 2012 2 comments
SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world. The source code for SQLite is in the public domain.
That is a statement of who defines the SQLite developers of SQLite. What is the advantage of using this SQLite?
As the above statement that SQLite does not require such a configuration server in general because SQLite is a library that only supports the SQL language and of course also with the many functions that are not inferior to another database server.

Here is why I am interested in this SQLite investigated.
There are many tools that can be used to manage SQLite database, one which I will discuss here is SQLite Studio.
SQLite Studio can run on multiple platforms, windows, linux and solaris.
The advantage of using SQLite Studio, you do not need to install in your PC or laptop because SQLite Studio is portable, so it can be used on a PC or laptop without having to install it first.

You can download SQLite Studio here.
Open SQLite Studio, the main menu should look like this picture SQLite Studio.

click the close button

To create a SQLite database, click the Add database.

Type the name of the database with the extension as you like, but I recommend using the extention .sdb. and now will see the database you just created.

to connect to the database, right-click your database name and select connect.


to create a new table, right-click Tables and select New Table.


type the name of the table, to add a field click on this button 

click the create button to finish creating the table.
will be seen in the left menu, table name that we have made.

Thus the use of SQLite Studio tutorial as a database manager to manage SQLite database.
for a complete tutorial on Sqlite Studio visit this link.
in the next post we will discuss ways make delphi connection to sqlite database. 

Number to words delphi function

Posted by Rahman M On Sunday, July 15, 2012 8 comments
After so many for a long time looked for the function delphi the number to the sentence, finally had met also. For you that needed, take note the function below this.

Function NumToWords(dblValue : Double) : String;
  ones : array[0..9] of String;
  teens : array[0..9] of String;
  tens : array[0..9] of String;
  thousands : array[0..4] of String;
  i, nPosition, nDigit, bAllZeros : Integer;
  strResult, strTemp, tmpBuff : String;


  ones[0] := 'ZERO';
  ones[1] := 'ONE';
  ones[2] := 'TWO';
  ones[3] := 'THREE';
  ones[4] := 'FOUR';
  ones[5] := 'FIVE';
  ones[6] := 'SIX';
  ones[7] := 'SEVEN';
  ones[8] := 'EIGHT';
  ones[9] := 'NINE';

  teens[0] := 'TEN';
  teens[1] := 'ELEVEN';
  teens[2] := 'TWELVE';
  teens[3] := 'THIRTEEN';
  teens[4] := 'FOURTEEN';
  teens[5] := 'FIFTEEN';
  teens[6] := 'SIXTEEN';
  teens[7] := 'SEVENTEEN';
  teens[8] := 'EIGHTEEN';
  teens[9] := 'NINETEEN';

  tens[0] := '';
  tens[1] := ''; //TEN1

  tens[2] := 'TWENTY';
  tens[3] := 'THIRTY';
  tens[4] := 'FORTY';
  tens[5] := 'FIFTY';
  tens[6] := 'SIXTY';
  tens[7] := 'SEVENTY';
  tens[8] := 'EIGHTY';
  tens[9] := 'NINETY';

  thousands[0] := '';
  thousands[1] := 'THOUSAND';
  thousands[2] := 'MILLION';
  thousands[3] := 'BILLION';
  thousands[4] := 'TRILLION';   


  strResult := '';
  strTemp := IntToStr(round(dblValue));
  //Iterate through string
  For i := Length(strTemp) downTo 1 do

    //Get value of this digit
    nDigit := StrToInt(MidStr(strTemp, i, 1));
    //Get column position
    nPosition := (Length(strTemp) - i) + 1;
    //Action depends on 1's, 10's or 100's column
    //Select Case (nPosition Mod 3)
    case (nPosition Mod 3) of

    1 :  //Case 1  //'1's position
        bAllZeros := 0;
        if i = 1 Then

          tmpBuff := ones[nDigit] + ' '
        if MidStr(strTemp, i - 1, 1) = '1' Then

          tmpBuff := teens[nDigit] + ' ';
        if nDigit > 0 Then

          tmpBuff := ones[nDigit] + ' '
          //If next 10s & 100s columns are also
          //zero, then don't show 'thousands'
          bAllZeros := 1;
          if i > 1 Then

            If MidStr(strTemp, i - 1, 1) <> '0' Then
              bAllZeros := 0;
          If i > 2 Then

            If MidStr(strTemp, i - 2, 1) <> '0' Then
              bAllZeros := 0;

          tmpBuff := '';
        If (bAllZeros = 0) and (nPosition > 1) Then

          tmpBuff := tmpBuff + thousands[nPosition div 3] + ' ';

        strResult := tmpBuff + strResult;
    2 :  //Tens position

        if nDigit > 0 Then
          //if MidStr(strTemp, i - 1, 1) <> '1' Then
          strResult := tens[nDigit] +  ' ' + strResult;

    0 :  //Hundreds position


        if nDigit > 0 Then
          strResult := ones[nDigit] + ' HUNDRED ' + strResult;


  Result := strResult;

  Result := '';


examples of such usage :

Label1.Caption := NumToWords('your variable');

Just simple right ? 

you can also try this Delphi function

in the next post I will give a delphi function, number to words the Indonesian version.

Source : forget the source of this.