online marketing
Posted by admin on January-11-2010 Add Comments

How To Detect Internet Explorer Version With PHP

Awhile ago I needed to detect the Internet Explorer version of the visitor from inside of my PHP script. Being lazy I just tried to Google for some existing code, but to my surprise there was none available! Well, I think it’s time to rectify that problem by publishing the code I ended up creating. The ieversion() function looks at the HTTP_USER_AGENT header sent by the browser to determine if the visitor is using Internet Explorer. If not, then the script will return -1. If yes, then the script will extract the version number and return that.

function ieversion() {
  ereg('MSIE ([0-9]\.[0-9])',$_SERVER['HTTP_USER_AGENT'],$reg);
  if(!isset($reg[1])) {
    return -1;
  } else {
    return floatval($reg[1]);
  }
}

What are the uses for this? You can do what I do and display a message notifying the visitor that he is using an outdated browser and he should upgrade to Firefox by clicking the Google Referal ad below. That solves two problems: Helps to pay the bills and I don’t have to make sure my site renders properly on the ancient Internet Explorer 6 (I let IE7 users get by, it does a pretty good job). I will publish the simple code I use for this later on.

Posted by admin on December-11-2009 Add Comments

Free Ads Manager Script in PHP

Free Ads Manager Script in PHP Powered by Expbuilder.com

Introduction

This can let your visitors add the ads without register, there are 2 types of ads:
1- free ads
2- premium ads

you have the full control from admin control panel, like allow, deny or delete.
Also you can make the ads active with client mail (activation mail)

Demo
To see the demo of script:
http://www.expbuilder.com/testpages/ads/index.php

install
1- unzip the ads.zip file and upload all files
2- run install.php file ex: www.yoursitename.com/install.php
3- set your database and server information
4- installing…
5- done

Download
the script is free, you can download it from here:
http://www.ziddu.com/download/7275637/ads.zip.html

thanks for choosing Expbuilder Ads Manager

Posted by admin on December-11-2009 Add Comments

JQuery Help Tooltip v1.0

JQuery Help Tooltip v1.0

HTML Code:
$(Element).helptooltip();

Demo: http://www.expbuilder.com/testpages/helptooltip/

Code:

HTML Code:
<span class="helps">
Click this help icon to test the help tooltip
</span>
<span><b>What is this ?</b> <br /> this is a test of JQuery Help Tooltip v1.0
<hr /> You can type any thing here !!</span>

</div>
<script type="text/javascript">
$(document).ready(function()
{
     $(".helps").helptooltip();
});
</script>

tested and working with all browsers

Download JQuery Help Tooltip v1.0

1- Download jQuery JavaScript Library – jquery-1.3.2.min.js
2- JQuery Help Tooltip v1.0 – jquery.helptooltip.zip

JQuery Help Tooltip v1.0 SetUp

A. Head Tag

Import files:

HTML Code:
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="jquery.helptooltip.js"></script>
<link href="jquery.helptooltip.css" rel="stylesheet" type="text/css" />

B. Body Tag

HTML & JavaScript Code:

HTML Code:
<span class="helps">
Click this help icon to test the help tooltip
</span>
<span><b>What is this ?</b> <br /> this is a test of JQuery Help Tooltip v1.0
<hr /> You can type any thing here !!</span>

</div>
<script type="text/javascript">
$(document).ready(function()
{
     $(".helps").helptooltip();
});
</script>

Posted by admin on December-11-2009 Add Comments

JQuery Easy Tooltip v2.0

JQuery Easy Tooltip v2.0

HTML Code:
$(Element).easytooltip(Formid, options{backgroundcolor, border, color, event})

Demo: http://www.expbuilder.com/testpages/easytooltip2/

To see the last version (1.0) goto: http://www.expbuilder.com/vb/showthread.php?t=2

HTML Code:

HTML Code:
<style type="text/css">

.bg
        {
           background-image: url(bg.jpg);
           width: 275px;
           height: 135px;
           padding: 22px 55px 20px 55px;
           background-repeat: no-repeat;
           background-position: left top;
        }

</style>

<a class="demo" href="javascript:void(0);">
Move your mouse point here to see what JQuery Easy Tooltip can do !!
</a>

</div>
<div id="formdisplay" style="display: none;padding: 20px;width: 500px;">

   <div class="bg">
         <h2>This is a Demo of Easy Tooltip</h2>
        you can but any thing you want here
   </div>
</div>

javascript Code:

HTML Code:
<script>
$(document).ready(function()
{
    $(".demo").easytooltip("formdisplay", {backgroundcolor: "transparent", border: "0px"});
});
</script>

Demo – Default

HTML Code:
<a class="demo" href="javascript:void(0);">
Move your mouse point here to see what JQuery Easy Tooltip can do !!
</a>

</div>
<div id="formdisplay" style="display: none;padding: 20px;width: 500px;">

   <div class="bg">
         <h2>This is a Demo of Easy Tooltip</h2>
        you can but any thing you want here
   </div>
</div>

<script>
$(document).ready(function()
{
    $(".demo").easytooltip("formdisplay", {backgroundcolor: "transparent", border: "0px"});
});
</script>

Change background Color – backgroundcolor

HTML Code:
<div id="formdisplay2" style="display: none;padding: 20px;width: 500px;">
         <h2>This is a Demo of Easy Tooltip</h2>
        you can but any thing you want here
</div>
<a id="demo2" href="javascript:void(0);">check background color !! </a>

<script type="text/javascript">
$("#demo2").easytooltip("formdisplay2", {backgroundcolor: "#3399FF"});
</script>

Change border

HTML Code:
<div id="formdisplay3" style="display: none;padding: 20px;width: 500px;">
         <h2>This is a Demo of Easy Tooltip</h2>
        you can but any thing you want here
</div>
<a id="demo3" href="javascript:void(0);">check border !! </a>

<script type="text/javascript">
$("#demo3").easytooltip("formdisplay3", {border: "6px solid #3399FF"});
</script>

Change Font Color

HTML Code:
<div id="formdisplay4" style="display: none;padding: 20px;width: 500px;">
         <h2>This is a Demo of Easy Tooltip</h2>
        you can but any thing you want here
</div>

<a id="demo4" href="javascript:void(0);">check Font Color !! </a>

<script type="text/javascript">
$("#demo4").easytooltip("formdisplay4", {color: "red"});

</script>

Change Mouse event

HTML Code:
<div id="formdisplay5" style="display: none;padding: 20px;width: 500px;">
         <h2>This is a Demo of Easy Tooltip</h2>
        you can but any thing you want here
</div>

<a id="demo5" href="javascript:void(0);">click here to check Mouse event !! </a>

<script type="text/javascript">
$("#demo5").easytooltip("formdisplay5", {event: "click"});

</script>

Download JQuery Easy Tooltip v2.0

1- Download jQuery JavaScript Library – jquery-1.3.2.min.js
2- JQuery Easy Tooltip v2.0 – easytooltip2.0.zip

Download this demo

- easytooltip2.0.package.zip

JQuery Easy Tooltip v2.0 SetUp

A. Head Tag

Import files:

HTML Code:
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="easytooltip.js"></script>

B. Body Tag

HTML & JavaScript Code:

HTML Code:
<div id="formdisplay"
style="display: none;padding: 20px;background-color: #ffffff;border: 3px solid #000;width: 500px;">
    <h2>This is a Demo of Easy Tooltip</h2>
    you can but any thing you want here
</div>

<script>
$(document).ready(function()
{
    $(".demo").easytooltip("formdisplay");
});
</script>
Posted by admin on December-11-2009 Add Comments

JQuery Esay Tooltip v1.0

JQuery Esay Tooltip v1.0

Code:
$(Element).easytooltip(formid)

Demo: http://www.expbuilder.com/testpages/easytooltip/

To see the version 2.0 goto: http://www.expbuilder.com/vb/showthread.php?t=3

Code:

HTML Code:
<div id="formdisplay"

style="display: none;padding: 20px;background-color: #ffffff;border: 3px solid #000;width: 500px;">

    <h2>This is a Demo of Esay Tooltip</h2>

    you can but any thing you want here

</div>
HTML Code:
<script>

$(document).ready(function()

{

    $(".demo").easytooltip("formdisplay");

});

</script>

Download JQuery Esay Tooltip v1.0

1- Download jQuery JavaScript Library – jquery-1.3.2.min.js
2- JQuery Esay Tooltip v1.0 – easytooltip.zip
Download this demo

- easytooltip.package.zip

JQuery Esay Tooltip v1.0 SetUp

A. Head Tag

Import files:

HTML Code:
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>

<script type="text/javascript" src="easytooltip.js"></script>

B. Body Tag

HTML & JavaScript Code:

HTML Code:
<div id="formdisplay"

style="display: none;padding: 20px;background-color: #ffffff;border: 3px solid #000;width: 500px;">

    <h2>This is a Demo of Esay Tooltip</h2>

    you can but any thing you want here

</div>

<script>

$(document).ready(function()

{

    $(".demo").easytooltip("formdisplay");

});

</script>

Posted by admin on December-11-2009 Add Comments

JQuery Float Dialog v1.0

JQuery Float Dialog v1.0

Easy PopUp
Code:
$(Element).floatdialog(dialog id, options {backgroundcolor, speed, event, effect, move, closeClass} )

To Ses the Demo: http://www.expbuilder.com/testpages/floatdialog/

Explain:
Demo 1 – Default use

HTML Code:

Code:
<a id="demo1" href="javascript :void(0);">Clicking Here</a>

<div id="dialog1">

    <a href="javascript :void(0);">X</a>

    <h1>Demo1 - Default use</h1>

    <h2>This is a demo of the JQuery Float Dialog v1.0</h2>

    <div>

       this is the default use, you can do this demo by your self !

       &nbsp;<b><a href="#demo1viewsource">Check demo1 view Source</a></b>

    </div>

</div>

Javascipt Code:

Code:
<script>

    $("#demo1").floatdialog("dialog1");

</script>

Demo 2 – Options

1- move

[ default - down - up - left - right - slidedown ]
HTML Code:

Code:
<a id="demo2" href="javascript :void(0);">Slide down</a>

<div id="dialog2">

    <a href="javascript :void(0);">X</a>

    <h1>Demo2 - Options - slide Down</h1>

    <h2>This is a demo of the JQuery Float Dialog v1.0</h2>

    <div>

       you can make the box is slide down .. also can make it slide up, left and right

       &nbsp;<b><a href="#demo2viewsource">Check demo2 view Source</a></b>

    </div>

</div>

Javascipt Code

Code:
<script>

    $("#demo2").floatdialog("dialog2", {move: 'down'});

</script>

2- effect

[ true - false ]

Code:
<script>

    $("#demo3").floatdialog("dialog3", {effect: false});

</script>

3- speed

[ slow - fast - number ]

Code:
<script>

    $("#demo4").floatdialog("dialog4", {speed: 'fast'});

</script>

4- event

[ click - mouseover ...ect ]

Code:
<script>

    $("#demo4").floatdialog("dialog4", {speed: 'fast'});

</script>

5- backgroundcolor

[ color ]

Code:
<script>

    $("#demo6").floatdialog("dialog6", {backgroundcolor: 'red'});

</script>
Code:
<script>

    $("#demo6").floatdialog("dialog6", {backgroundcolor: '#CC0033'});

</script>

6- closeClass

[ Dialog Close button class ]

Default: closebutton

Code:
<a id="demo6" href="javascript :void(0);">You can change the close button class to what you want</a>

<div id="dialog6">

    <a href="javascript :void(0);">X</a>

    <h1>Demo2 - Options - Close button class</h1>

    <h2>This is a demo of the JQuery Float Dialog v1.0</h2>

    <div>

       You can change the close button class to what you want

    </div>

</div>

<script>

    $("#demo6").floatdialog("dialog6", {closeClass: '.myclosebutton'});

</script>

Download JQuery Float Dialog v1.0

1- Download jQuery JavaScript Library – jquery-1.3.2.min.js
2- JQuery Float Dialog v1.0 – jquery.floatdialog.zip
Download this demos

- jquery.floatdialog.package.zip JQuery Float Dialog v1.0 SetUp

A. Head Tag

1- css code:

Code:
<style>

.disable_masking

{

    z-index: 6001;

    position: absolute;

    display: none;

}

.closebutton

{

    float: right;

    text-decoration: none;

}

</style>

2- Import files:

Code:
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>

<script type="text/javascript" src="jquery.floatdialog.js"></script>

B. Body Tag

1- HTML & JavaScript Code:

Code:
<a id="linkid" href="javascript :void(0);">Clicking Here</a>

<div id="dialogid">

    <a href="javascript:void(0);">X</a>

    <h1>DIALOG DATA HERE !</h1>

</div>

<script>

    $("#linkid").floatdialog("dialogid");

</script>

===========================
Powered by: Ahmed Elkadrey – Expbuilder.com

Posted by admin on December-11-2009 Add Comments

In-place editing with contentEditable property and jQuery

In-place editing with contentEditable property and jQuery

Firefox 3 was released on June 17, 2008, and from that time, Firefox 2 browser share is quickly dropping. Very soon it will become inefficient to continue supporting it. And we will be able to use a lot of new Firefox 3 features, such as canvas support, CSS and DOM improvements and other. I am really glad that Firefox3 supports the “contentEditable” property. Setting this attribute to “true” allows you to make parts of a document editable. This attribute was already supported by IE6/7/8, Safari, Chrome and Opera. So now we can start using it in our applications.

To test “contentEditable” I made a plugin that allows you to convert parts of the page into editable areas, just click on them and when you finish editing click outside. If you convert an inline element (h1…h5, p ) with this script, the line breaks will be disabled.

Usage

First, add jQuery, plugin and style sheet to your page.

HTML Code:
<link href="editableText.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script src="../jquery.editableText.js" type="text/javascript"></script>

Next, pass the elements you want to make editable to the plugin. In this example I marked editable elements with “editableText” class.

HTML Code:
jQuery(function($){
     $('.editableText').editableText({
          // default value
          newlinesEnabled: false
     });

     // we will add more code here
});

Now you should create a function that will do something with the new
value of the editable element. Bind it to the element using change

HTML Code:
 //  bind an event listener that will be called when
   //  user saves changed content
   $('.editableText').change(function(){
         var newValue = $(this).html();

         // do something
         // For example, you could place an AJAX call here:
        $.ajax({
          type: "POST",
          url: "some.php",
          data: "newfieldvalue=" + newValue,
          success: function(msg){
            alert( "Data Saved: " + msg );
          }
       });
   });
event.

Download: http://www.ziddu.com/download/722162…87275.zip.html

Script Demo: http://valums.com/wp-content/uploads…/demo/demo.htm

Posted by admin on December-11-2009 Add Comments

How to Install MySQL Database Server on Windows XP

Go to your desktop and inside the folder you have initially created find file mysql-5.0.41.win32.zip. Extract the content of this file to the same folder on the desktop. Now go inside mysql-5.0.41-win32 folder and double click Setup.exe. Follow the steps:

Fig. 18 – Click next.


Fig. 19 – Select Custom and click next.


Fig. 20 – Click Change button to change the path of the installation.


Fig. 21 – Navigate to C:\webserver\mysql and click OK, then click next.


Fig. 22 – Click Install to start installation.


Fig. 23 – During installation a new window will pop up introducing MySQL Enterprise. Simply click next twice to continue with your installation.


Fig. 24 – Your installation is finished. You are now ready to configure your MySQL Server. Click Finish to start configuration. MySQL Configuration

Fig. 25 – On the first screen click next.


Fig. 26 – Select Detailed Configuration and click next.


Fig. 27 – Select Developer Machine and click next.


Fig. 28 – Select Multifunctional Database and click next.


Fig. 29 – Leave everything as default and click next.


Fig. 30 – Select Decision Support (DSS)/OLAP and click next.


Fig. 31 – Leave two options checked and port number as 3306 and click next.


Fig. 32 – Select Standard character Set and click next.


Fig. 33 – Select Include Bin Directory in Windows PATH and leave other options as default. Click next.


Fig. 34 – Tick Modify Security Settings and type in a password you want to use to access MySQL server, then click next.


Fig. 35 – Click Execute to apply configuration settings.


Fig. 36 Click Finish to exit configuration wizard.
The last thing you need to do is to open php.ini file located in C:\webserver\php and uncomment the line extension=php_mysql.dll by removing semicolon ; at the beginning. Save the file and close it. Restart the computer.
This way you have completed your installation and you are now ready to start developing your web applications using Apache, PHP and MySQL.
Good Luck!

Posted by admin on December-11-2009 Add Comments

How to Install PHP on Windows XP

Installing PHP on Windows XP

Go to your desktop and in the folder you initially created find file called php-5.2.3-Win32.zip.
Extract the content of this file to C:\webserver\php. Pull out all of the files from the php-5.2.3-Win32 folder and place them directly in C:\webserver\php.
Now we need to add our C:\webserver\php folder to the path of the Environment Variables.
To do this right click My Computer icon on your desktop and choose Properties. Then choose Advanced tab and click Environment Variables button (Fig. 13).

Fig. 13
Now select Path from the System variables list in the bottom part of the window and click Edit (Fig. 14).

Fig. 14
In the new window click inside the Variable value: box and press End button on your keyboard to get to the end of the path.
Now type in or copy and paste the following ;C:\webserver\php (Fig. 15). Make sure you start it with semicolon and to use back slashes.

Fig. 15
Once you have done this click OK in all of the windows until you close the System Properties window. Now you need to restart the computer.
Next step will be to find out if our PHP is working. Go to Start > Run and type cmd. In the command prompt window type php -v. You should see something like Fig. 16.

Fig. 16
We still have some tweaking to do before we finish our installation.
Go to C:\webserver\php and find file called php.ini-recommended. Rename that file to php.ini.
Open this file and make the following amendments:

  1. identify line with doc_root = and change it to:
    doc_root = C:\webserver\Apache2\htdocs
  2. identify line with extension_dir = “./” and change it to:
    extension_dir = C:\webserver\php\ext

Save and close the file.
Apache Configuration
Now we need to make sure that Apache knows where to search for php modules.
To do that first go to C:\webserver\Apache2\conf and open file httpd.conf in your text editor.
Because we will be running PHP as an Apache module which is faster and more secure option comparing to CGI binary, we will need to do the following changes to httpd.conf file:

  1. identify LoadModule section and add the following line at the top of this section:
    LoadModule php5_module “C:/webserver/php/php5apache2.dll”
  2. identify AddType section and add the following line at the top of this section:
    AddType application/x-httpd-php .php
  3. lastly place the following line somewhere within the content:
    PHPIniDir “C:/webserver/php/” – ensure you have a closing slash at the end of the path.

Save and close file. Restart Apache by going to Start > All Programs > Apache HTTP Server 2.0.59 > Control Apache Server and click Restart.
Now go to C:\webserver\Apache2\htdocs folder and select all files by pressing Ctrl + A on your keyboard. Right click on any of the selected files and choose Properties. In Attributes section of the General tab tick Hidden checkbox and click Apply and OK to close the window. This way you will only see your own files in this folder which is the root of our web server and the place where you will be setting up all your projects.
Inside C:\webserver\Apache2\htdocs create a file and give it a name phpinfo.php. Open this file with your text editor and place the following line:
<?php phpinfo(); ?>. Save and close the file.
Open your browser and type the following line in the URL:
http://localhost/phpinfo.php.
You should see now a PHP information page (Fig. 17).

Fig. 17 Now that our Apache and PHP is installed let´s move on to the next section where we will be installing MySQL.

Posted by admin on December-11-2009 Add Comments

how to Installing Apache on Windows XP

how to Installing Apache on Windows XP

This tutorial will show you how to install Apache 2.0.59, PHP 5.2.3 and MySQL 5.0.41 on machine running Windows XP.
To start with we will download all of the necessary applications which can be found at the following locations:
Apache: Apache download page
File to download: Win32 Binary (MSI Installer): apache_2.0.59-win32-x86-no_ssl.msi
PHP: PHP download page
File to download: PHP 5.2.3 zip package
MySQL: MySQL download page
File to download: Windows (x86) ZIP/Setup.EXE
Create a folder on your desktop and place all downloaded files inside of it.
Now go the the C:\ drive and create a folder with a name webserver.
This will be the folder where all of our apache, php and mysql files will be kept. Inside of this folder create another two: php and mysql.
Go to your desktop to the previously created folder and double click apache_2.0.59-win32-x86-no_ssl.msi. This will start installation of Apache web server. Follow the instructions:

Fig. 01 – Click next


Fig. 02 – Select I accept terms in the licence agreement and click next.


Fig. 03 – Click next


Fig. 04 – In the first two fields type in localhost and in the last one info@localhost. We will be installing Apache as a service which starts automatically when computer starts therefore we select Port 80. If you are about to use your web server just from time to time then you may choose Port 8080. This way you would need to start Apache manually everytime you are going to use it.


Fig. 05 – Select Custom and click next.


Fig. 06 – Because we want our server to be installed in C:\webserver click Change button to change the path of the installation.


Fig. 07 – Navigate to C:\webserver and click OK. On the next screen click next.


Fig. 08 – Now you are ready to install Apache. Click Install.


Fig. 09 – Once everything is done click Finish to exit setup.


Fig. 10 – You should now see a small Apache icon in the system tray.


Fig. 11 – In your C:\webserver folder you should notice an extra Apache2 folder has been created which stores your web server files.


Fig. 12 Now let´s see if Apache is running. Open your browser and if you were installing Apache as a service (Port 80) then type in URL http://localhost and press Enter. You should see the same page as displayed above. If you were installing Apache using Port 8080 then you would need to first start it by going to Start > All Programs > Apache HTTP Server 2.0.59 > Control Apache Server and click Start. Then in your browers´s URL type http://localhost:8080. This should open the same page in your browser.
Make sure you allow Apache access on your firewall.
Now let´s go to the next section to install PHP.