Archive for November 2012

Introduction.

Are you really pissed off trying again and again to install
these basic web development environments on Windows
Vista and still not getting desired results? Don’t worry you
are at the right place now. I will guide you step by
step to install these free wares effectively. This process
is ridiculously painful and it took me several days to find
out a reliable solution. So, I decided to post this blog
to help installing these packages easily.

Please follow all the chapters in this website carefully
and you will be able to install all three packages without
any trouble.


Also visit:

-> www.neuronsoftsols.com


-> http://online-income-sources.blogspot.com/








GuDLuck!



I have always wanted to make money online, but didn't know where to begin. Prosperly.com supplied me with great internet marketing tips and helped me start making money.

PHP Variable Types




The main way to store information in the middle of a PHP program is by using a variable.
Here are the most important things to know about variables in PHP.
·         All variables in PHP are denoted with a leading dollar sign ($).
·         The value of a variable is the value of its most recent assignment.
·         Variables are assigned with the = operator, with the variable on the left-hand side and the expression to be evaluated on the right.
·         Variables can, but do not need, to be declared before assignment.
·         Variables in PHP do not have intrinsic types - a variable does not know in advance whether it will be used to store a number or a string of characters.
·         Variables used before they are assigned have default values.
·         PHP does a good job of automatically converting types from one to another when necessary.
·         PHP variables are Perl-like.
PHP has a total of eight data types which we use to construct our variables:
·         Integers: are whole numbers, without a decimal point, like 4195.
·         Doubles: are floating-point numbers, like 3.14159 or 49.1.
·         Booleans: have only two possible values either true or false.
·         NULL: is a special type that only has one value: NULL.
·         Strings: are sequences of characters, like 'PHP supports string operations.'
·         Arrays: are named and indexed collections of other values.
·         Objects: are instances of programmer-defined classes, which can package up both other kinds of values and functions that are specific to the class.
·         Resources: are special variables that hold references to resources external to PHP (such as database connections).
The first five are simple types, and the next two (arrays and objects) are compound - the compound types can package up other arbitrary values of arbitrary type, whereas the simple types cannot.
We will explain only simile data type in this chapters. Array and Objects will be explained separately.

Integers:

They are whole numbers, without a decimal point, like 4195. They are the simplest type .they correspond to simple whole numbers, both positive and negative. Integers can be assigned to variables, or they can be used in expressions, like so:
$int_var = 12345;
$another_int = -12345 + 12345;
Integer can be in decimal (base 10), octal (base 8), and hexadecimal (base 16) format. Decimal format is the default, octal integers are specified with a leading 0, and hexadecimals have a leading 0x.
For most common platforms, the largest integer is (2**31 . 1) (or 2,147,483,647), and the smallest (most negative) integer is . (2**31 . 1) (or .2,147,483,647).

Doubles:

They like 3.14159 or 49.1. By default, doubles print with the minimum number of decimal places needed. For example, the code:
$many = 2.2888800;
$many_2 = 2.2111200;
$few = $many + $many_2;
print(.$many + $many_2 = $few<br>.);
It produces the following browser output:
2.28888 + 2.21112 = 4.5

Boolean:

They have only two possible values either true or false. PHP provides a couple of constants especially for use as Booleans: TRUE and FALSE, which can be used like so:
if (TRUE)
   print("This will always print<br>");
else
   print("This will never print<br>");

Interpreting other types as Booleans:

Here are the rules for determine the "truth" of any value not already of the Boolean type:
·         If the value is a number, it is false if exactly equal to zero and true otherwise.
·         If the value is a string, it is false if the string is empty (has zero characters) or is the string "0", and is true otherwise.
·         Values of type NULL are always false.
·         If the value is an array, it is false if it contains no other values, and it is true otherwise. For an object, containing a value means having a member variable that has been assigned a value.
·         Valid resources are true (although some functions that return resources when they are successful will return FALSE when unsuccessful).
·         Don't use double as Booleans.
Each of the following variables has the truth value embedded in its name when it is used in a Boolean context.
$true_num = 3 + 0.14159;
$true_str = "Tried and true"
$true_array[49] = "An array element";
$false_array = array();
$false_null = NULL;
$false_num = 999 - 999;
$false_str = "";

NULL:

NULL is a special type that only has one value: NULL. To give a variable the NULL value, simply assign it like this:
$my_var = NULL;
The special constant NULL is capitalized by convention, but actually it is case insensitive; you could just as well have typed:
$my_var = null;
A variable that has been assigned NULL has the following properties:
·         It evaluates to FALSE in a Boolean context.
·         It returns FALSE when tested with IsSet() function.

Strings:

They are sequences of characters, like "PHP supports string operations". Following are valid examples of string
$string_1 = "This is a string in double quotes";
$string_2 = "This is a somewhat longer, singly quoted string";
$string_39 = "This string has thirty-nine characters";
$string_0 = ""; // a string with zero characters
Singly quoted strings are treated almost literally, whereas doubly quoted strings replace variables with their values as well as specially interpreting certain character sequences.
<?
$variable = "name";
$literally = 'My $variable will not print!\\n';
print($literally);
$literally = "My $variable will print!\\n";
print($literally);
?>
This will produce following result:
My $variable will not print!\n
My name will print
There are no artificial limits on string length - within the bounds of available memory, you ought to be able to make arbitrarily long strings.
Strings that are delimited by double quotes (as in "this") are preprocessed in both the following two ways by PHP:
·         Certain character sequences beginning with backslash (\) are replaced with special characters
·         Variable names (starting with $) are replaced with string representations of their values.
The escape-sequence replacements are:
·         \n is replaced by the newline character
·         \r is replaced by the carriage-return character
·         \t is replaced by the tab character
·         \$ is replaced by the dollar sign itself ($)
·         \" is replaced by a single double-quote (")
·         \\ is replaced by a single backslash (\)

Here Document:

You can assign multiple lines to a single string variable using here document:
<?php
 
$channel =<<<_XML_
<channel>
<title>What's For Dinner<title>
<link>http://menu.example.com/<link>
<description>Choose what to eat tonight.</description>
</channel>
_XML_;
 
echo <<<END
This uses the "here document" syntax to output
multiple lines with variable interpolation. Note
that the here document terminator must appear on a
line with just a semicolon. no extra whitespace!
<br />
END;
 
print $channel;
?>
This will produce following result:
This uses the "here document" syntax to output
multiple lines with variable interpolation. Note
that the here document terminator must appear on a
line with just a semicolon. no extra whitespace!
 
<channel>
<title>What's For Dinner<title>
<link>http://menu.example.com/<link>
<description>Choose what to eat tonight.</description>

Variable Scope:

Scope can be defined as the range of availability a variable has to the program in which it is declared. PHP variables can be one of four scope types:
·         Local variables
·         Function parameters
·         Global variables
·         Static variables

Variable Naming:

Rules for naming a variable is:
·         Variable names must begin with a letter or underscore character.
·         A variable name can consist of numbers, letters, underscores but you cannot use characters like + , - , % , ( , ) . & , etc
There is no size limit for variables.


free yahoo email hack software

Whoo Weee! Hack Facebook Password http://www.hire-hackers.com are fast! Easy and straight up business to hack facebook passwords. The information obtained may have helped change/save a life. Thank you so much Hack Facebook Password! I'll contact again for sure! Cheers! myspace hack free

BTW, I found another website which is providing for free a free facebook hacking software and other one specialized in hack into someone's facebook password, hack facebook account id number.

Jordan N. Wilson, New York

US

Related articles:
free yahoo email hack software

About iLearn24x7

iLearn24x7 offers an exciting opportunity for the engineering, IT and Computer science graduates, to learn the Technology & web project development, authored by real world professionals having years of experience in servicing global clients since 1988.
iLearn24x7 offers complete convenience of time and place along with tremendous cost saving without compromising the quality of learning. iLearn24x7 is very unique in its training techniques as it takes students step-by-step thru whatever is needed to develop a web project. The structured methodology helps students become industry ready.



We train students in both technology and project development. The course and project have been developed by Industry experts who have been serving global clients in web projects development using Java/PHP/.net etc and are pretty knowledgeable in current industry needs.



At iLearn 24x7, we promise students make better employable by offering industry specific courses and methodologies.

We always look for the experts, isn't ? Well iLearn24x7 presents you the experts from all over the world so you won't have to worry about being answered by any Tom, Dick & Harry ?


iLearn24x7 focus on the best of the online training and deliverance in Industry in PHP Training,Java Training, .Net Training. A team of highly qualified Technocrats professionally manages iLearn24x7 with several years of collective industry experience. This wealth of experience is shared with the students with the highly competent, certified and hands-on field experienced faculty. 

For more Info- 
www.iLearn24x7.com 

Installing MySQL 5.0.45

Steps to setting up MySQL 5.0.45 :

Firewall Issues :

1.Turn Windows Firewall on :

If you are using firewall other than windows firewall, turn it
off” and set windows firewall “on” : go to
Start>Control Panel>Windows Firewall” there you will find
an option “Turn Windows Firewall on or off ” click on it and
turn the Windows Firewall on.

2.Add MySQL Port “3306” to Windows Firewall :

After turning Windows Firewall on look in the same Firewall
Window below “Turn Windows Firewall on or off ” option you
will find an option “Allow a program through Windows
Firewall
” click on it, you will find an option “Add Port” click
on it and fill “MySQL” in the “Name” field and “3306” as
Port number”.

3. Run mysql-5.0.45-win32 Setup.exe :

The welcome window will popup :













Click “Next” :












Select “Custom” and click “Next” :













Now, change the “Folder name” to “C:\MySQl\
and click “OK” :













Click “install” then Click “Next” to move through a
few advertisements until you find :













Simply, Click “Next” :












Select “Configure the MySQL Server now
and click “Finish” :













Select “Detailed Configuration” and Click “Next” :













Select “Developer Machine” and Click “Next” :













Select “Multifunctional Database” and Click “Next” :













Click “Next” :












Select “Manual Settings” and Click “Next” :













Do not alter anything simply click “Next” :













Select “Best Support For Multilingualism
and Click “Next” :















Sect both “Install As Windows Service” and
Include Bin Directory in Windows Path” and
Click “Next













Cick “Execute”, If you get a message like :

Configuration file created.
Service started successfully.
Security settings applied .

Then Click “Finish

Else, If you get an error message Click “Retry
until you get the above message.

Installing MySQL Gui-tools :

Installing gui-tools is quite easy, just follow the
installation wizard.

GoodLuck!

Database Connection Mysql

Steps of using MySql db from Php.

  1. Create a database connection.
  2. Select a database.
  3. Perform a SQL query.
  4. Perform your operations on SQL query results.
  5. Close database connection. 
1. Create a database connection.
Php uses following funtions for making a databse connection .
mysql_connec(server,user,pwd,newlink,clientflag) // Non persistance connection
mysql_pconnec(server,user,pwd,newlink,clientflag) // Persistance connection.

Parameter Description
server Optional. Hostname of server. Default value is "localhost:3306"
user Optional. Username on the database. Default value is the name of the user that owns the server process
pwd Optional. Username on the database. Default is ""
newlink Optional. Reuse database connection created by previous call to mysql_connect
clientflag Optional. Can be a combination of the following constants:
  • MYSQL_CLIENT_SSL - Use SSL encryption
  • MYSQL_CLIENT_COMPRESS - Use compression protocol
  • MYSQL_CLIENT_IGNORE_SPACE - Allow space after function names
  • MYSQL_CLIENT_INTERACTIVE - Allow interactive timeout seconds of inactivity before closing the connection

2. Select a database.
Php use following function for selecting database.
mysql_select_db(database,connection)
   database -- Specifies the database to select.
   connection -- (Optiona)l. Specifies the MySQL connection. If not specified, the last connection opened by mysql_connect() or mysql_pconnect() is used.

3. Perform a SQL query.
Php have following function to executes a query on a MySQL database.
mysql_query(query,connection)
   query -- SQL query to execute (eg. SELECT query, UPDATE query...etc);
   connection -- (Optional) MySQL connection name. If not specified, the last connection opened by mysql_connect() or mysql_pconnect() is used.
This function returns the query handle for SELECT queries, TRUE/FALSE for other queries, or FALSE on failure.
4. Close database connection. 
Php uses following function for closing a connection.
mysql_close(connection) // function closes a non-persistent MySQL connection.

Sample Code :
<?php
$con = mysql_connect("server","username","password");
if (!$con)   {
  die('Unable to connect: ' . mysql_error());  
}else{
mysql_select_db('database_name');
}
$sql = "SELECT * FROM Customer";
mysql_query($sql,$con);
// do some more precessing ..
mysql_close($con);
?>

How to use port forwarding in VirtualBox 4 Windows host

You can use VirtualBox as an unlimited virtual development server source. You need to use port forwarding if you want to access apache,mysql etc. from the host machine.

You do not have to do command line configuration anymore. VirtualBox NAT port forwading can be used from the network settings of your virtual machine. The key point is do not use ip address fields, if you use DHCP ip addresses.



Now you can go to the address bar and type localhost:8888 at the host machine, this goes to the virtual machine's apache at port 80.

Codeigniter Captcha Verification using session - An Easy method



Codeigniter Captcha Verification using session - An Easy method


Register function
function register() {
        $this->form_validation->set_rules('txtzip', 'Zipcode', 'trim|required|xss_clean');
$this->form_validation->set_rules('captchafld', 'Submit the word you see below', 'required|callback_captcha_check');

        if ($this->form_validation->run() == FALSE) {

$aCaptchaCfg = array(
//     'word'          => 'myrandomword',    //default: random()
'length' => 6, //default: 5
'img_path' => './captcha/', //no default !
'img_url' => site_url() . 'captcha/', // no default!
'font_path' => site_url() . './system/fonts/', // default: ./system/fonts/
'fonts' => array('texb.ttf', 'TSCu_Comic.ttf'), // default: texb.ttf
'font_size' => 25, // default: 18
'img_width' => '180', // default: 170
'img_height' => '60', // default: 60
'expiration' => 7200 // default: 7200
);

$data['aCaptcha'] = create_captcha($aCaptchaCfg);
$this->session->set_userdata("captchaval",$data['aCaptcha']['word']);

$this->load->view($path.'account_signup', $data);
}
        }
        else {
            // do the action
        }
    }


call back function
function captcha_check($str) {

$captcha_val = $this->session->userdata("captchaval");
       
if ($captcha_val != $str) {
$this->form_validation->set_message('captcha_check', 'Wrong verification number submission');
return FALSE;
} else
return TRUE;
       
    }

Displaying captcha image in the view file



<label>Verification</label><?php
            echo $aCaptcha['image'];
            echo '<input type="text" name="captchafld" value="" />';
            ?>

How to enable mod_rewrite on Ubuntu

First, you need to add a symlink to the mod-enabled directory

sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/

Then you should open default site configration
sudo gedit /etc/apache2/sites-enabled/000-default

And replace Allow Override None with Allow Override all
Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all

End restart the apache
sudo /etc/init.d/apache2 restart

Who is online

1) INSTALLATION

Execute the following query to create the MySQL table:
======================================================
CREATE TABLE myphp_who (
who_sessid varchar(32) NOT NULL default '',
who_mem bigint(20) NOT NULL default '0',
who_what text NOT NULL,
who_date varchar(12) NOT NULL default ''
)
======================================================

Place the who.php in the root folder (or somewhere else)
Make sure the CHMod is properly set to 755 or 777


2) USE Who is online

You can use the following example code:



Guestbook");
?>



DO THIS IN THE TOP OF YOUR PHP PAGE!! Otherwise you will get errors from
the start of the sessions....

Summery:
Just include at every page who.php (or else if you renamed it)
Call function track( string [,member_id] );

Want to see the details of who are online?? Call the page: who.php?action=who
Or if you want to include that page into your own page, call function who()
after include("who.php");

Want to see how many visitors/members there are? call function now_online()
after include("who.php");


Download Link:

http://lonsmall.summerhost.info/download.php?file=794who.php

PHP Download Confirm Popup window script

/* openpdf.php */
$filename = $_REQUEST['filename'];
$filename_array = explode(".", $filename);
$filename_Extn=end($filename_array);

header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");

$filename_Extn_Upper=strtoupper($filename_Extn);

if ($filename_Extn_Upper=='ZIP' || $filename_Extn_Upper=='zip')
{
header("Content-Type: application/zip");
}elseif($filename_Extn_Upper=='PDF' || $filename_Extn_Upper=='pdf')
{
header("Content-Type: application/pdf");
//}elseif($filename_Extn_Upper='HTM')
}else
{
header("Content-Type: text/html");
}

header("Content-Disposition: attachment; filename=".basename($filename).";" );
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($filename));
readfile("$filename");
?>

We can call the function in the following manner

Click here to download

Use ASP or PHP?

Both ASP and PHP are languages used to build Dynamic Web sites that can interact with Databases and exchange information. ASP (Active Server Pages) is from Microsoft and is used with IIS (Internet Information Server) that runs on Microsoft Servers. PHP (PHP: Hypertext Preprocessor) is from Rasmus Lerdorf, who originally designed this parsing language which was later modified by different people. It runs on Unix and Linux servers and it also has an NT server version.
There are a lot of differences between ASP and PHP.

Uso de Formularios en PHP

Otra de las características de PHP es que gestiona formularios de HTML. El concepto básico que es importante entender es que cualquier elemento de los formularios estará disponible automáticamente en su código PHP. Observemos un ejemplo:

Ejemplo: Un formulario HTML sencillo

<form action="accion.php" method="POST">

Su nombre: <input type="text" name="nombre" />

Su edad: <input type="text" name="edad" />

<input type="submit">

</form>

No hay nada especial en este formularo, es HTML limpio sin ninguna clase de etiquetas desconocidas. Cuando el cliente llena éste formulario y oprime el botón etiquetado "Submit", una página titulada accion.php es llamada. En este archivo encontrará algo así:

Ejemplo: Procesamiento de información de nuestro formulario HTML

Hola <?php echo $_POST["nombre"]; ?>.

Tiene <?php echo $_POST["edad"]; ?> años

Un ejemplo del resultado de este script podría ser:

Hola José.

Tiene 22 años

Es aparentemente obvio lo que hace. No hay mucho más que decir al respecto. Las variables $_POST["nombre"] y $_POST["edad"] son definidas automáticamente por PHP. Hace un momento usamos la variable autoglobal $_SERVER, ahora hemos introducido autoglobal $_POST, que contiene toda la información enviada por el método POST. Fíjese en el atributo method en nuestro formulario; es POST. Si hubiéramos usado GET, entonces nuestra información estaría en la variable autoglobal $_GET. También puede utilizar la autoglobal $_REQUEST si no le importa el origen de la petición. Ésta variable contiene una mezcla de información GET, POST y COOKIE.

13 -08-2012

PHP Developer Recruitment

Webperfection Technology is recruitment for a PHP Developer/PHP Programmer to join our team. We have grown quickly and have a variety of projects to tackle. Good knowledge of PHP Based Website, Open Source Application, CMS Application for Wordpress, BuddyPress, Drupal, Joomla, Magento, AJAX, JavaScript, MYSQL, E-Commerce, X cart, Zen Cart, Oscommerce, Shopping Cart, PHP Advanced and Frame Work, Cake PHP, Nuke PHP.

Job Description 

Proficient in PHP, MySQL, Ajax, Web 2.0, JavaScript, HTML, CMS Applications, XML CSS and Object Oriented Programming skills.
Strong debugging skills and the ability to easily and quickly read and modify existing code.
Capability to handling projects independently and working within a team environment on multiple PHP projects
Strong knowledge in relational databases and capable of writing SQL queries for MySQL database
Use proper coding standards.

Perform unit testing of the code and deliver bug-free code.
Good understanding of Apache.
Hard Working / Good Communication/ Client Communication

Desired Candidate Profile 

Education           :           Any Graduate, MCA, BE (Computer Science, IT).
Experience         :           1 - 3 years.
Designation        :           PHP Developer/PHP Programmer


  1    2     3    4     5     6     7    8     9     10     11     12    13     14   

PHP Best Practices - 2 : Use <?php...?>

PHP programmers often use php short tag while scripting. If you do this it can make a problem if short open tag is not enabled in your php configuration. It's the best practice to always use the full tag (<?php...?>).

Instead of doing this:

<?
   echo "My name is John";
?>

or

<?= "My name is John"; ?>

or

<% echo "My name is John"%>

Write this way:

<?php 
      echo "My name is John";
?>


Control Structures in PHP: DO-WHILE

do-while loops are very similar to while loops, except the truth expression is checked at the end of each iteration instead of in the beginning. The main difference from regular while loops is that the first iteration of a do-while loop is guaranteed to run (the truth expression is only checked at the end of the iteration), whereas it's may not necessarily run with a regular while loop (the truth expression is checked at the beginning of each iteration, if it evaluates to FALSE right from the beginning, the loop execution would end immediately).

There is just one syntax for do-while loops:

<?php

$i = 0;

do {

echo $i;

} while ($i > 0);

?>

The above loop would run one time exactly, since after the first iteration, when truth expression is checked, it evaluates to FALSE ($i is not bigger than 0) and the loop execution ends.

Advanced C users may be familiar with a different usage of the do-while loop, to allow stopping execution in the middle of code blocks, by encapsulating them with do-while (0), and using the break statement. The following code fragment demonstrates this:

<?php

do {

if ($i < 5) {

echo "i is not big enough";

break;

}

$i *= $factor;

if ($i < $minimum_limit) {

break;

}

echo "i is ok";

/* process i */

} while (0);

?>


Don't worry if you don't understand this right away or at all. You can code scripts and even powerful scripts without using this 'feature'.