Text Link Ads

Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Saturday, June 16, 2007

Simple Upload Page


with this code, you can create an upload page that combines HTML and PHP easily. this Source code has been writen form T4VN Team. so, if you want to develop it, please contact us. Thanks for your interested in this code

Step 1: Create one page with HTML content

File:




Step 2 : Create file upload.php with content :

// $userfile is where file went on webserver
$userfile = $HTTP_POST_FILES['userfile']['tmp_name'];
// $userfile_name is original file name
$userfile_name = $HTTP_POST_FILES['userfile']['name'];
// $userfile_size is size in bytes
$userfile_size = $HTTP_POST_FILES['userfile']['size'];
// $userfile_type is mime type e.g. image/gif
$userfile_type = $HTTP_POST_FILES['userfile']['type'];
// $userfile_error is any error encountered
$userfile_error = $HTTP_POST_FILES['userfile']['error'];

// userfile_error was introduced at PHP 4.2.0
// use this code with newer versions

if ($userfile_error > 0) {
echo 'Problem: ';
switch ($userfile_error)
{ case 1:
echo 'File exceeded upload_max_filesize';
break;
case 2:
echo 'File exceeded max_file_size';
break;
case 3:
echo 'File only partially uploaded';
break;
case 4:
echo 'No file uploaded';
break;
}
exit;
}

// put the file where we'd like it
$upfile = '/uploads/'.$userfile_name;

// is_uploaded_file and move_uploaded_file
if (is_uploaded_file($userfile))
{
if (!move_uploaded_file($userfile, $upfile))
{
echo 'Problem: Could not move file to destination directory';
exit;
}
} else {
echo 'Problem: Possible file upload attack. Filename: '.$userfile_name;
exit;
}
echo 'File uploaded successfully

';

// show what was uploaded
echo 'Preview of uploaded file contents:
';
echo $contents;
echo '
';
?>

Note :line: $upfile = '/uploads/'.$userfile_name; Folder of files have been stored, you can change it depending on your ideas

Another form of Upload file, you can choose file that you want to upload optionally

Create file upload.php with contents :

//Define some variables
$dir = "path/where/you/want/to/upload/files/"; //Bạn nên thay ðổi ðýờng dẫn cho phù hợp
//Kiều file, Gif, jpeg, zip ::bạn có thể sửa ðổi nếu thích
$types = array("image/gif","image/pjpeg","application/x-zip-compressed");

//Check to determine if the submit button has been pressed
if(isset($_POST['submit'])){

//Shorten Variables
$tmp_name = $_FILES['upload']['tmp_name'];
$new_name = $_FILES['upload']['name'];

//Check MIME Type
if (in_array($_FILES['upload']['type'], $types)){

//Move file from tmp dir to new location

move_uploaded_file($tmp_name,$dir . $new_name);

echo "{$_FILES['upload']['name']} was uploaded sucessfully!";

}else{

//Print Error Message

echo "File {$_FILES['upload']['name']} Was Not Uploaded!
";

//Debug
$name = $_FILES['upload']['name'];
$type = $_FILES['upload']['type'];
$size = $_FILES['upload']['size'];
$tmp = $_FILES['upload']['name'];

echo "Name: $name
Type: $type
Size: $size
Tmp: $tmp";

}

}

else{

echo 'Could Not Upload Files';

}
?>




Wednesday, June 13, 2007

PHP HTML Tutorial // POST Table Forms

A PHP and HTML Tutorial in which we processes information from a form using the $_POST[]; functions in PHP and created a table and form.






Tuesday, June 12, 2007

How to install and run phpAdsNew?

By: Bedrich Omacka

What is phpAdsNew? It is great script written in PHP which can be used to manage different ad campaigns on your website. PhpAdsNew supports banners of any size (including flash banners), pop-ups, text ads and many different types of rich media ads. Using this script you can manage third party ads, e.g. ads from banner exchanges. And the good message is that this script is free.

How to install phpAdsNew?

First, ensure that your web hosting provider offers PHP support (PHP 4.0.4 or higher) and MySQL database (3.23.3 or higher). Then download the zip or tgz package and unzip it to your hard drive. You can use WinZip or Total Commander to do this. Now upload the files to your web host. Change the permissions of the config.inc.php file using "chmod a+w config.inc.php". Create new MySQL database with any name, e.g. phpadsnew (or use existing database). Now you are able to run the installer. Point your browser to http://www.yourdomain.com/phpadsnew (or another folder where you copied the files). Follow the instruction on the screen and finish the installation process.

Another and easier solution how to install this PHP script is to sign up for a quality web hosting service which offers pre-installed PHP scripts. Then easily go to your control panel, find the section with pre-installed scripts and select phpAdsNew. The installer will do all the job for you. All you need to do is to choose the script you want to install.

How to run phpAdsNew?

Go to admin interface and create at least one zone. Zone is the place on your website where the ads will be displayed (e.g. top banner on the home page can be zone 1, bottom banner on the section page zone 2 etc.). Then create a new client. When you're done, create new campaign for this client. You can set up the zone(s), limit of banner / text ads / rich media... impressions, when the campaign will start and finish, the frequency at which the ad will be shown and many other options.

Ok, we have some campaigns now and they are sucessfully running. But every advertiser wants to check the results of his campaign. From this reason phpAdsNew has very detailed stats section. Your advertisers (or you if you use this script to manage your own ads) will be able to see how many times was particular ad viewed by the website visitors and click through rate (how many % of visitors clicked the ads). In addition, you can watch weekly and daily stats. Stats can be exported to *.csv file (data from *.csv files can be opened by software like MS Excel on your computer).

I hope you will find these information helpful when you will start using phpAdsNew. If you will need some advanced functions I suggest to open phpAdsNew/misc/documentation folder where are stored three *.pdf files with very detailed description of this script. The first one, administrator-guide.pdf, will help you with the installation process and configuration. Developer-guide.pdf is for advanced users with PHP knowledge. The most important file is user-guide.pdf which will provide you by all the functions. Btw. this file has 109 pages. Good luck!

Article Source: http://www.articlerich.com

Bedrich Omacka is marketing manager of Marble Host, a company providing quality web hosting with preinstalled PHP scripts including phpAdsNew.


Sunday, June 10, 2007

Developing A Login System With PHP And MySQL

By John L

Most interactive websites nowadays would require a
user to log in into the website’s system in order to provide a
customized experience for the user. Once the user has logged in, the
website will be able to provide a presentation that is tailored to the
user’s preferences.

A basic login system typically contains 3 components:

1. The component that allows a user to register his preferred login id and password

2. The component that allows the system to verify and authenticate the user when he subsequently logs in

3. The component that sends the user’s password to his registered email address if the user forgets his password

Such a system can be easily created using PHP and MySQL.

================================================================

Component 1 – Registration

Component 1 is typically implemented using a simple HTML form that contains 3 fields and 2 buttons:

1. A preferred login id field

2. A preferred password field

3. A valid email address field

4. A Submit button

5. A Reset button

Assume
that such a form is coded into a file named register.html. The
following HTML code excerpt is a typical example. When the user has
filled in all the fields, the register.php page is called when the user
clicks on the Submit button.

[form name="register" method="post" action="register.php"]

[input name="login id" type="text" value="loginid" size="20"/][br]

[input name="password" type="text" value="password" size="20"/][br]

[input name="email" type="text" value="email" size="50"/][br]

[input type="submit" name="submit" value="submit"/]

[input type="reset" name="reset" value="reset"/]
[/form]

The
following code excerpt can be used as part of register.php to process
the registration. It connects to the MySQL database and inserts a line
of data into the table used to store the registration information.

@mysql_connect("localhost", "mysql_login", "mysql_pwd") or die("Cannot connect to DB!");
@mysql_select_db("tbl_login") or die("Cannot select DB!");
$sql="INSERT INTO login_tbl (loginid, password and email) VALUES (".$loginid.”,”.$password.”,”.$email.”)”;
$r = mysql_query($sql);
if(!$r) {

$err=mysql_error();

print $err;

exit();
}

The
code excerpt assumes that the MySQL table that is used to store the
registration data is named tbl_login and contains 3 fields – the
loginid, password and email fields. The values of the $loginid,
$password and $email variables are passed in from the form in
register.html using the post method.

================================================================

Component 2 – Verification and Authentication

A
registered user will want to log into the system to access the
functionality provided by the website. The user will have to provide
his login id and password for the system to verify and authenticate.

This is typically done through a simple HTML form. This HTML form typically contains 2 fields and 2 buttons:

1. A login id field

2. A password field

3. A Submit button

4. A Reset button

Assume
that such a form is coded into a file named authenticate.html. The
following HTML code excerpt is a typical example. When the user has
filled in all the fields, the authenticate.php page is called when the
user clicks on the Submit button.

[form name="authenticate" method="post" action="authenticate.php"]

[input name="login id" type="text" value="loginid" size="20"/][br]

[input name="password" type="text" value="password" size="20"/][br]

[input type="submit" name="submit" value="submit"/]

[input type="reset" name="reset" value="reset"/]
[/form]

The
following code excerpt can be used as part of authenticate.php to
process the login request. It connects to the MySQL database and
queries the table used to store the registration information.

@mysql_connect("localhost", "mysql_login", "mysql_pwd") or die("Cannot connect to DB!");
@mysql_select_db("tbl_login") or die("Cannot select DB!");
$sql="SELECT loginid FROM login_tbl WHERE loginid=’".$loginid.”’ and password=’”.$password.”’”;
$r = mysql_query($sql);
if(!$r) {

$err=mysql_error();

print $err;

exit();
}
if(mysql_affected_rows()==0){

print "no such login in the system. please try again.";

exit();
}
else{

print "successfully logged into system.";

//proceed to perform website’s functionality – e.g. present information to the user
}

As
in component 1, the code excerpt assumes that the MySQL table that is
used to store the registration data is named tbl_login and contains 3
fields – the loginid, password and email fields. The values of the
$loginid and $password variables are passed in from the form in
authenticate.html using the post method.

================================================================

Component 3 – Forgot Password

A
registered user may forget his password to log into the website’s
system. In this case, the user will need to supply his loginid for the
system to retrieve his password and send the password to the user’s
registered email address.

This is typically done through a simple HTML form. This HTML form typically contains 1 field and 2 buttons:

1. A login id field

2. A Submit button

3. A Reset button

Assume
that such a form is coded into a file named forgot.html. The following
HTML code excerpt is a typical example. When the user has filled in all
the fields, the forgot.php page is called when the user clicks on the
Submit button.

[form name="forgot" method="post" action="forgot.php"]

[input name="login id" type="text" value="loginid" size="20"/][br]

[input type="submit" name="submit" value="submit"/]

[input type="reset" name="reset" value="reset"/]
[/form]

The
following code excerpt can be used as part of forgot.php to process the
login request. It connects to the MySQL database and queries the table
used to store the registration information.

@mysql_connect("localhost", "mysql_login", "mysql_pwd") or die("Cannot connect to DB!");
@mysql_select_db("tbl_login") or die("Cannot select DB!");
$sql="SELECT password, email FROM login_tbl WHERE loginid=’".$loginid.”’”;
$r = mysql_query($sql);
if(!$r) {

$err=mysql_error();

print $err;

exit();
}
if(mysql_affected_rows()==0){

print "no such login in the system. please try again.";

exit();
}
else {

$row=mysql_fetch_array($r);

$password=$row["password"];

$email=$row["email"];

$subject="your password";

$header="from:you@yourdomain.com";

$content="your password is ".$password;

mail($email, $subject, $row, $header);

print "An email containing the password has been sent to you";

}

As
in component 1, the code excerpt assumes that the MySQL table that is
used to store the registration data is named tbl_login and contains 3
fields – the loginid, password and email fields. The value of the
$loginid variable is passed from the form in forgot.html using the post
method.

================================================================

Conclusion

The
above example is to illustrate how a very basic login system can be
implemented. The example can be enhanced to include password encryption
and additional functionality – e.g. to allow users to edit their login
information.


3 Reasons Why PHP Message Boards Rock

If you are web designer, chances are you include forums on at least some of the sites you manage. If you haven't explored PHPBB2 you are missing out as this type of message board offers to designers a forum that is well supported, easy to manage, and above all else: free! Let's see why PHPBB2 is a hit with so many web designers.

Compared to some web designers, I am relatively new to the business. I created my first forum with MSN groups in 2002 then, six months later, I made the move over to EZBoard. Sure, it did not have all the bells and whistles of vBulletin and other corporate developed boards, but it did the trick for me. That is, until EZBoard was hacked and my livelihood nearly disappeared in moments some two years later!

In search of something different, I considered the move to vBulletin, but I was quite frankly not wanting to shell out license and upgrade fees on a regular basis. At the time of the EZBoard incident, I was running six forums, so I knew that I would eventually have about that many when I completed my transition away from EZBoard.

So, why PHPBB2? For three reasons:

1. It is free. Yes, absolutely! Since it is "open source" code, developed by the developers, it is offered as a free download to whosoever will. Believe me that is a big appeal and, apparently, many designers around the world feel the same way as over 200,000 people are members of their support forum.

2. It can be used across platforms. Whether you work in Windows or Linux, IIS or Apache PHPBB2 is usable and fully functionable.

3. Highly modifiable. Open Source extensibility is evident with the incorporation of PHP, HTML, CSS, and MySQL into the forum.

For the novice, PHPBB2 does take some getting used to especially since you are responsible for installing, maintaining, backing up, upgrading, and modifying your own forum. For your benefit you can access onsite Flash tutorials which are a great way to walk your way through the installation process too. As with any software it is vulnerable to outside attacks, so take care to make sure you regularly back up your forums and familiarize yourself with the security procedures.

In all, PHP message boards really do rock and at a price that cannot possibly be beat!

Matt runs two PHPBB2 sites at http://www.aviationemploymentboard.net and http://www.corporateflyer.net

Using PHP for Website Navigation, Explained.

This summary is not available. Please click here to view the post.

Introduction to Web services with PHP

By: Krystal L. L.

Note that both Google's service and PEAR::SOAP
are technically still in beta, so you might encounter the odd bug from
time to time. There are other SOAP client libraries available,
including the PHP5 SOAP extension and NuSOAP, and while implementation
details are different the basic theory is the same as presented here.



Setting up the PEAR SOAP module



Before we can start using SOAP, we had better make sure both PEAR
itself and the SOAP module are available. The PEAR package manager is
installed by default with PHP 4.3.0 and later, but if you are using an
earlier version or it is missing on your system check out the PEAR
manual for instructions.



Once you have the package manager installed, you will need to download
the SOAP package. On most systems, you can just enter pear install SOAP
into a console window. At least, that's the theory. Unless there is a
stable release of SOAP available, you will get the message No release
with state equal to: 'stable' found for 'SOAP'. Try pear install
SOAP-beta to get the most current version of the package at the time of
writing, even though it is in beta, or tell PEAR to accept beta
versions without complaint by typing pear config-set preferred_state
beta.



You may also get one or more messages starting with requires package,
followed by Dependencies failed. In this case, try the pear install
command again but add the dependencies on the command line. For
example, if PEAR complained that the Net_DIME package is missing, try
using pear install Net_DIME SOAP instead.



Getting a license key



Once you have installed the SOAP module, the next step is to download
the Google Web APIs developers' kit and register to get a license key.
This key allows you to make up to 1000 SOAP queries a day free of
charge. Visit Google Web APIs (http://www.google.co.uk/apis/) and
follow the instructions on the site.



Unzip the developers' kit and put it in a convenient place. It only
contains samples for accessing the service with .NET and Java, but most
of the documentation applies equally to calling Google from PHP.



Decoding the WSDL file



In the developer's kit main directory you will find a WSDL file called
GoogleSearch.wsdl, which you can open in a text editor or XML browser.
This file defines exactly what services we can call using SOAP, though
the Google documentation is probably easier to read!



However, we can also see what the SOAP module makes of this file. Create a new PHP page and enter the following.






require_once'SOAP/Client.php';

$wsdl=new SOAP_WSDL('GoogleSearch.wsdl');

header('Content-Type:text/plain);

echo$wsdl->generateProxyCode();



?>



Place it somewhere on your server along with GoogleSearch.wsdl and
access it through your web browser. Assuming everything is working
right, you should get a lot of PHP code output. This code is the result
of the SOAP_WSDL client class parsing the WSDL file and converting it
into PHP functions. This tells us what functions we can call in a
rather more readable form than the WSDL document, and is handy
particularly if you are using a poorly documented WSDL service.



So how does the code work? Let's go through it step by step:



1. First, we load the SOAP client file. If this gives an error, it
probably means SOAP isn't installed properly and you should read the
instructions above or the PEAR manual.



2. We then create an instance of the SOAP_WSDL class, based on the
GoogleSearch.wsdl file. This is one of the main classes we are going to
use throughout this tutorial: it parses the WSDL file and represents it
as PHP.



3. Finally, we output the proxy code as plain text. (As you can see
from the output, in SOAP the proxy is a class that represents the WSDL
calls available as PHP functions.)



Spell-checking with Google



If you've been using Google for a while (and type as erratically as
me), you have probably noticed the "Did you mean..." line that appears
if you misspell a word in a search. Thanks to the Google web service,
we can add this spelling checker to our PHP applications (though to be
honest, it would probably be better to use pspell in an actual
application). Enter the following code, with your own license key as
the first string.






require_once'SOAP/Client.php';

$key = 'Enter your Google APIs key here');

$wsdl = new SOAP_WSDL('GoogleSearch.wsdl');

$googleProxy = $wsdl->gettProxy();

echo $googleProxy->doSpellingSuggestion($key, 'diktionary');



?>



Simple, isn't it? The first line is trivial and the next two are the
same as the previous example. The fourth line creates the proxy object
based on the code we looked at earlier, so we can make SOAP requests by
calling its methods. Finally, we call doSpellingSuggestion and output
the result. Access this page in your web browser, and you should see
the word 'dictionary' on its own.



You might see 'Object' instead, in which case SOAP has encountered a
problem and returned a SOAP_Fault object. We will look into dealing
with these faults sometime in the future, but for now check if you have
entered your license key correctly and not managed to exhaust your 1000
query per day limit (!).


Have you ever wanted to enrich your site with
information from Google, Amazon, eBay, or one of the many other sites
that provide web services through SOAP? In this tutorial, I will be
demonstrating how to use the SOAP package from PEAR to query Google's
extensive database. This tutorial assumes that you are using PHP 4 or
higher and PEAR::SOAP 0.8.1, and requires basic familiarity with PHP
(including a little object-oriented programming).


Advantages of PHP Development

By: Nasir

PHP Hypertext Processor is a server-side web programming language that can be embedded into HTML. PHP uses are widespread, and can include any kind of server functionality that takes user’s input and displays or manipulates the input. PHP can run on both UNIX and Windows servers, which makes it more accessible than Windows (ASP). This scripting language is growing day by day. PHP5 a fully object oriented language and its platform independence and speed on Linux server helps to build large and complex web applications.
PHP is a particularly useful programming language because it allows for advanced programming and is easy to integrate with web pages. Another plus of PHP is that the language interfaces very well with MySQL, a popular type of online database. MYSQL is a commercial grade database application that is made available free under the Open Source to anyone. Another plus of PHP is that it is Open Source Code. The actual code that is PHP is available to the public for free, while the source code for products such as ASP is not. So PHP is very cheap. Because PHP is open source, there is a large community of PHP programmers that help each other with code. This means PHP programmers can rely on each other by using reusable pieces of code called functions and classes rather than constantly reinventing the wheel. This can dramatically cut down on production time.
PHP is based on C++ language and the syntax used in PHP is quite similar to C/C++. C/C++ is still considered the best programming language by many programmers and people who love this language would surely feel more comfortable with the syntax of PHP.
PHP and MySQL are excellent choice for webmasters looking to automate their web sites. Now search spiders "see" all the content on a PHP page, the same way it is viewed in a browser. The creation of a php-shopping cart is surprisingly simple and when done with precision it could translate into a highly effective and universally accepted php-shopping cart.

ASP vs. PHP

by: Halstatt Pires

When building web sites, ASP and PHP are very popular languages. Here’s my opinion on whether ASP or PHP is best

ASP v. 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 (Personal Home Pages) 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.

Cost

To run ASP programs one needs IIS installed on a Windows platform server, which is not free. PHP programs run on Linux, which is free. Even the connectivity of the database is expensive in the case of ASP as MS-SQL is a product of Microsoft that needs to be purchased. PHP generally uses MySQL, which is freely available.

Speed

If we compare the speed of ASP and PHP then PHP has an upper hand. PHP code runs faster than ASP. ASP is built on COM based architecture, which is an overhead for the server whereas PHP code runs in its own memory space.

Platform Compatibility

PHP programs can run on various platforms like Linux, Unix, Windows and Solaris whereas ASP is mainly associated with Windows platforms. However, ASP can run on a Linux platform with ASP-Apache installed on the server.

Additional Costs

Many of the tools used in PHP are free of cost and since PHP is open source a lot of code can be found in open source forums. PHP has inbuilt features like ftp, email from a web page or even encryption mechanisms but in ASP such features are not built in and some additional components are required. Therefore an additional cost is incurred for such components.

Base Language

PHP is based on C++ language and the syntax used in PHP is quite similar to C/C++. C/C++ is still considered the best programming language by many programmers and people who love this language would surely feel more comfortable with the syntax of PHP. ASP on the other hand has a more Visual Basic kind of syntax that again is closely related to only Microsoft products. So, it depends on a person-to-person which language he or she is comfortable

Database Connectivity

PHP, being extremely flexible, can connect to various databases, the most popular being MySQL. ASP mainly uses MS-SQL.

Conclusion

Both languages have their advantages specific to users. Some would argue that both the languages have their own importance and depending on the user's requirements the language and the platform can be chosen. If we talk about developing a discussion board then ASP is equally capable but many feel the best discussion boards are developed in PHP. If a user is looking for some e-commerce application development then many would call ASP the ideal choice. This does not mean that PHP cannot provide e-commerce solutions, only that many people choose ASP.

From my perspective, PHP is an all around better choice than ASP.

PHP Web Development: PHP Variables

By Gagandeep Singh Tathgar

While working with any language we make use of
variables. Variables are used to store values and reuse them in our
code. We use different types of variables in our code such as strings
(text), integers (numbers), floats (decimal numbers), boolean (true or
false) and objects. In PHP we can make use of variable while writing
scripts. In this lesson we're going to cover PHP variables.

What is a variable?

A
variable is a mean to store values such as strings, integers or
decimals so we can easily reuse those values in our code. For example,
we can store a string value such as "I Love PHP" or an integer value of
100 into a variable.

PHP Variable Syntax

$var_name = value;

Defining Variable in PHP?

Here is an example of how to declare a variable in PHP.

Some key points to notice:

- Remember to put the $ sign in front of variables when declaring variables in PHP.

- Variable names must start with letters or underscore.

- Variables can’t include characters except letters, numbers or underscore.

PHP variable types?

Unlike
Java or C++, PHP doesn't care about primitive types. Any variable,
either a string, an integer or a float is declared the same way. PHP
converts the types in the code by itself. Here's what I mean.

//an integer variable
$var_name = 100;

//an float variable
$var_name = 100.00
?>

PHP Variable type juggling

Like
mentioned above, PHP doesn't require variables to declared using
primitive types. Therefore, juggling between two types doesn't require
use of any special function. We can simply do things like...

//string var
$var = "0";

//var is now float
$var += 2.5;

//var is now integer
$var += 2;

//var is now string
$var .= " is the total";
echo $var;

?>

Concatenating variables in PHP?

In PHP we can join two variables by using the dot '.' operator.

$var1 = "I Love PHP";
$var2 = " and Java";

//prints "I Love PHP and Java"
echo $var1 . $var2;

$var1 = "1";
$var2 = "2";

//prints "12";
echo $var1 . $var2;

?>

So there you have it, a quick and easy variable lesson in PHP. You can see more examples of PHP variables at http://php-learn-it.com/php_variables.html or go to Learn PHP for more tutorials.

Have fun coding!


What can PHP scripts online do for your website?

By: Talia

Making the most out of your website is probably one of the most important things that you need to do, but do you have any idea of where to start? Buying PHP scripts online is a great way to make your site more profitable and efficient.

Buying PHP scripts online is as easy as 1-2-3. Really, I am not exaggerating the ease with which you can transform your lackluster website into a powerhouse of profit.

A good website needs to be dynamic, it needs to attract and keep traffic, that is what conversion is all about If people come to your site and then click away in seconds you are not going to make any money, right? It is all about good common sense.

With a great niche topic and a good PHP script you can make money by selling products or services or even with Google adwords. It doesn’t matter what you are selling or promoting, a good PHP script online bought is going to do all of the work for you. You will be able to process requests from your customers, process payments and so much more and the best part is that you can get PHP scripts online cheap, much cheaper than you would imagine.

A website made with PHP scripts online is one that will never get old. It will be efficient, fast and useful to anyone who is looking to make money online. You can make millions of dollars while you are sleeping, it is that easy. Just get the PHP scripts online, install them and you are set for years.

But what are you supposed to look for in the PHP scripts online that you buy? That question is a little trickier.

There are many different sites out there that say they will give you free PHP scripts, but many of these are incomplete or lacking in the latest that the internet has to offer. Things change fast in the world of programming and scripting, that is why you need the latest products. That is why you may want to look for PHP scripts online that will offer you a guarantee regular updates. Not all offer this and it is vital that you check for these if you want to not throw your money away.

And if you are looking to purchase a package of PHP scripts online, then look for one that has a good versatility. Instead of looking for a PHP script package that has 10 different PayPal processing scripts, look for one with a PayPal PHP script, a Storm Pay script as well as a Solar Pay script for example. The more versatility you can get into the product that you buy the better off you will be.

When shopping, you will find that many of the best packages out there offer you everything you need for your entire site all in one convenient package, it is so simple it is funny! And the money you will save by buying the PHP scripts online already written is enormous and the icing on the cake is that you can install them all yourself. Good packages have great instructions that make is truly simple.

Using Niche Marketing and PHP Scripts to Make Your Millions

By: Talia

Niche marketing is simple and it is effective. If you have not yet learned how simple this concept is then you are missing out on a fantastic opportunity.

Making millions online is something that we can all do, honest. All we need to do is learn the tricks of the trade, for example niche marketing and the power of PHP scripts online. Using niche websites to make the big bucks is the fastest way to do it not to mention the most fun.

A niche website can be anything from gall bladder disease or a special kind of car or even a single car part. Try to think of things that you have always wanted to know about but have had trouble finding info on. The more niche you go the better your chances of succeeding because the competition is nil.

Writing for niche websites is easy. You can use all kinds of sources for information. You can check out the library in your area to get some free resources or you can use the internet. The competition may not be very much but it is still there and by seeing what they have you can learn what to change or make better for your own. You can see what the weaknesses are of those sites and make sure you avoid them completely. This is a great way to make sure that you are always at the top of the heap.

Niche sites can be a lot of fun to work with. The topics can be pretty out there, you can go with something like senior dating or something as simple as how to find good car parts. Then add some Google adwords or sell and ebook or two and you are set. You will be raking in the dough all day long all week long!

The next step to making your niche website a good one is to get some good PHP scripts. These can be found online without any trouble at all, and even more important without having to pay an arm and a leg.

If you have ever had to pay a programmer to write a script for you then you know the hundreds or even thousands of dollars it can run you, it is painful! That is why getting a good PHP script package online is such a great idea.

This makes everything simple and straightforward. These packages come with all the things you need to make your niche marketing website a great one. You can find payment processors, email PHP scripts and everything else that you need to make your site one for the record books.

Niche marketing websites are the way of the future and if you want to make money fast and easy then it is high time you check them out for yourself.

Saturday, June 9, 2007

Something about AJAX --PHP

By: Darren Dunner

The asynchronous JavaScript and XML technology, simply called AJAX technology is one main technology that is playing a major part in Web 2.0 revolution. Web developers are facing a major challenge from several years. They are unable to change the information on a part of the web page with out actually reloading the whole web page. This has really been a big problem over the years and it largely irritates the users while doing small changes in the information on a given web page. AJAX has solved this problem up to a great extent.

With the help of AJAX, web programmers can make the web page to request web server to just change information which is on a part of the web page with out reloading the whole web page. In order to achieve this, SAJAX (Simple AJAX toolkit), which is a toolkit that is totally written in PHP programming language, has been introduced. This tool kit helps the web programmer to integrate the java Script with web server side PHP language. This will make the life of the web developer very easy.

But still, there are some down sides to this AJAX technology also just like with any other web technology, for that matter any technology. One of the major limitations of AJAX technology is related to the option of book marking. This limitation can create many hectic problems for the users of the web sites especially when the information requests to the web server are done through Post and Get methods. One another major limitation is related to the Back option on any web page. When a user presses on this option, this will take the user to first page rather than the last page which he viewed. This can surely surprise many web users who use extensively this option day in and day out.

AJAX technology can be easily used with many programming languages like java, PHP and so on. However, PHP is the most suitable web programming language to implement AJAX technology. Most of tool kits including SAJAX are also written in PHP. This should make the life of PHP programmers even easier.

GOOGLE is extensively using AJAX technology in many of its products, which includes GMail, Google Suggestions and so on. It is promoting this in a big way. So, if you are a web programmer, especially if you are a PHP developer then you should try and implement AJAX technology in your future projects to realize its real potential and power.



Text Link Ads

Server Side Programming Languages

By: dave

Server-side programming languages are scripts that are executed on the server, and are then translated into HyperText Markup Language (HTML) which can be viewed by all web browsers. The two most popular server-side scripting languages are PHP: Hypertext Processor and Active Server Pages (ASP). Additionally, there are numerous other languages like AJAX and Coldfusion.

PHP can run on both Unix and Windows servers, which makes it more accessible than its Windows counterpart, Active Server Pages (ASP). Most full-service web design firms will have at least one PHP guru.
PHP uses are widespread, and can include any kind of server functionality that takes user's input and displays or manipulates the input. Some pertinent examples of such work are message boards, auction sites, shopping carts, and more. There are numerous free (open-source) scripts out there for PHP newbies to use. This synopsis is meant to serve only as a gateway to other works; although the main goal is to give a reader enough information so they can make educated decisions about what their web developer should do. For those looking to get into PHP, there are many free tutorials and primers out there: http://www.4webhelp.net/tutorials/php/basics.php is a pertinent example.
PHP generally uses the mySQL database system. MySQL is a server-side system that is included on many Unix, and some Windows servers.

On the other hand, Active Server Pages runs - for the most part - solely on Windows servers. This can cause some problems. Windows hosting or private servers generally cost more than Unix servers, making it less accessible than PHP. Like PHP, ASP can do just about anything. There are considerably fewer open-source scripts written in ASP, another testament to its inaccessibility.
For those interested in ASP, here's a great free tutorial: http://www.w3schools.com/asp/default.asp.

ASP can use many different database systems. Many users prefer Microsoft Access. Access, unlike MySQL, offers a what-you-see-is-what-you-get (WYSIWYG) editor as part of Microsoft's Office suite. In fact, you may already have a copy of Microsoft Access on your computer and not even know it. Its uses aren't limited to databasing, it's also used as a basic spreadsheet application for those who need a more programmer-friendly environment than Excel. ASP can also work well with MSSQL or MySQL.

A third programming language with burgeoning popularity is Asynchronous Javascript and XML. AJAX, as it's commonly referred to, creates interactive web programs just like its cousins ASP and PHP. AJAX uses XHTML and CSS, along with the Javascript Document-Object Model to create interactive pages designed for speed and overall usability. Although AJAX hasn't gained the acclaim of PHP and ASP, its future is certainly bright.
AJAX Basics - http://dhtmlnirvana.com/ajax/ajax_tutorial/

It's difficult to say which of the three programming languages, or the numerous others for that matter, is the best. There will always be disputes, and no standard is set. With the varying interpretations of what a programming language should be, predilections to PHP or ASP arise. PHP is certainly more widely used, but isn't necessarily the best. When a site is being created to be interactive, a professional can give an educated opinion on which technology should be used.




Get custom programming done at GetAFreelancer.com!

PHP Application framework : evolution of CMS?


A content management system is a computer software system for organizing and facilitating collaborative creation of documents and other content. A content management system is sometimes a web application used for managing websites and web content, though in many cases, content management systems require special client software for editing and constructing articles.

You can add/edit content, display it in various formats (for example html vs. pdf vs. rss) and usually manage the content of a website with a cms.
Some definitions, or better, some of the feature lists of more popular cms' go way beyond management of content, getting into actual site building, adding of modules like polls, newsletter sign-ups etc.
cms does not mean site creation but site content management.
To fully understand what it is a CMS does, we have to first define a) what it is we are referring to when we talk about content b) what it is we understand under its management and c) what do we mean by a system.
Content is in essence, any type or 'unit' of digital information. It can be text, images, graphics, video, sound, documents, records etc - or in other words - anything that is likely to be managed in an electronic format.
Content Management is effectively the management of the content described above, by combining rules, process and/or workflows in such a way that its electronic storage is deemed to be 'managed' rather than 'un-managed'.
The system itself is definable as a tool or combination or tools that facilitate the efficient and effective production of the desired 'output' using the managed content.
"A CMS is a tool that enables a variety of (centralised) technical and (de-centralised) non technical staff to create, edit, manage and finally publish (in a number of formats) a variety of content (such as text, graphics, video, documents etc), whilst being constrained by a centralised set of rules, process and workflows that ensure coherent, validated electronic content."

MODX CMS = OPEN SOURCE PHP APPLICATION FRAMEWORK.

MODx is an open source PHP Application Framework that helps you take control of your online content.
It empowers its users to build engaging "Web 2.0" sites today, with its pre-integrated Scriptaculous and Prototype libraries.
Not only does MODx help you build sites quickly, but it also is both robust and simple.

Who uses MODx?
Bloggers, developers and other members of the digerati looking for more, MODx can help take it to the next level.
MODx makes working with the tools du jour easy, be it Ajax or the most highly search optimized CSS/XHTML sites.
MODx allows you to focus on usability, design, content and building great sites, not on the tools that build them.

The SEO CMS:
MODx helps you build sites that perform well in search engines – in fact, we think it's a great SEO CMS.
Typically, sites with minimal code/markup compared to the actual words on the page fare better in the search game. Aguments with lots of good evidence behind them abound for that lean, semantic XHTML/CSS sites gives the words more weight or "relevancy" (a very important SEO term) compared to sites that are built on top of bloated structures with loads of non-semantic markup (typically, table-based sites).
MODx makes creating sites that search engines can love almost automatic. What you put in it and however you want it to look is what you get out of MODx.
Write XHTML code that puts the important content as close as possible to the body tag

We don't force a cumbersome template language or "block" or "3-column" or "channel" or "insert-favorite-term-here" template system. In fact, creating a template in MODx is as simple as taking some static XHTML (or HTML chock full of tables even!) and replacing a few key areas with things like [*pagetitle*], [*longtitle*], [*description*], [*content*], [*sidebar*], [[Menu]] and {{footer}}. That means you can build a super-clean XHMTL/CSS driven site that uses the minimum amount of code so search engines have nothing but your content to think about.
Every MODx page has several bits of "metadata" that are automatically available to every page.
The way your browser's URLs return are also important in the Search game. Google arbitrarily refuses to index URLs containing "?id=". Many argue about how URLs should be written, so that's why MODx and mod_rewrite let you do it whichever way you prefer. You can create URLs manually or dynamically in several formats:

* http://mysite.com/p1234.html (or .cgi or .jsp or .aspx or .php or .cfm or .anythingyouwant)
* http://mysite.com/1234 (no extension)
* http://mysite.com/page-name.html (manually created)
* http://mysite.com/page_name.html (automatically created from the page title)
* http://mysite.com/some/subfolder/pagename.html (uses site hierarchy and allows for duplicate aliases in different pages)
* any combination of the above

Meta Content Management (including Keywords)

The MODx Ajax CMS and PHP Application Framework brings plenty to the table, with more on the way, including:

* Strong Web Standards Support – MODx does not force you into awkward and confusing blocks-this or channels-that templating engines or layout rules. You can build XHTML 1.1 Strict sites just as easily as a tag-soup laden table layout. MODx is the dream CMS for CSS designers.
* Web 2.0 Features (yes, that means Ajax) – MODx is the first free PHP CMS to offer an API that fully supports Web 2.0 Ajax technology thanks to script.aculo.us. Expect to see this grow more and more into our manager over time, but you can make use of it today in your own custom applications including live search, web effects, Ajax communications and more.
* PHP Application Framework – a flexible API and a event model that allows to override how the core behaves means that you get both tremendous flexibility, but also the ability to customize the solution to your needs and a simple upgrade path.
* Works in your favorite browser – and yes that means Safari! You can manage your websites from anywhere in the world with an internet connection and IE 5.5+, Safari 1.3+, Firefox 1.0+.
* Graphical Installer – it's now easier for less experienced users to get up and running fast with a step-by-stop online installer.
* Improved Rich Text Editors – All MODx RTEs are optional plug-ins, making for a smaller base download. FCKeditor ships out of the box. Adding new RTEs to MODx is simple with TinyMCE available now as an optional download and Textile, Markdown and widgEditors on their way.
* Better handling of aliases and menu indexes – Search Engine Friendly aliases are automatically created from the page titles and the system will check for alias conflicts before saving a page. Reordering your pages with Ajax-enabled drag and drop indexing.
* Robust CSS Menu Builder – Menus made from ULs are ready to go out of the box. Whether you want something simple as a bulleted list for a sidebar or as complex as Big John's deluxe menus complete with CSS "hover zones", MODx has you covered.
* Improved Meta-tag and keywords controls – consider MODx your #1 free Search Engine Optimization CMS. MODx helps your SEO efforts by making it easier to adjust meta-content of your site on a per-page basis.
* Separate Manager and Web User sessions – simplify your testing and development workflow.
* Improved Document Parser and Error handling – build better custom applications with a more robust API and greatly improved error handling and reporting inside the manager.
* Custom Content Types – use MODx documents to manage your linked Style Sheets, Images and Javascript. Transform them into XML, PDF, Excel or Word documents with snippets and this handy new feature.
* Bug fixes and usability tweaks – a more polished and robust product, bringing us to the home stretch to the official project launch and 1.0 release.

Finally, MODx also provides several ways to manage the meta content on every page. You can use {{chunks]] to create sets of meta content, or it's built-in (but optional) meta content management system.
As an editor there are two ways to publish content:

* in the main Content Area, and
* in other areas called Template Variables (traditionally side blocks, but they can be placed anywhere on the webpage).

There are two important feature of MODx that you you need know about:

* Chunks - these are re-usable pieces of HTML content. You can place a Chunk in the main content area or in a template variable. For example, you could put your contact details into a Chunk and then you can publish them in different places on the your website without re-typing the details.
* Snippets - these are small functional items, such as menus and search bars. These can be published in the template, a document's main content area, a chunk or in a template variable.

A Chunk or Snippet can be placed directly into the template by your web developer, or inserted by you into the Content Area or a Template Variable.

* The template contains the main framework of the webpage. Your web developer may choose to have content that appears on every page in the site. In this example the header and logo are fixed in the template.
* The template contains the Content Area, identified in pink, and inserted into the template with the syntax [*content*]. This content is taken from the Document as edited in the Manager.
* The template also contains MODx tags that insert Snippets. In this example there are two menu Snippets, identified in blue and inserted with the following syntax [[SnippetName]]
* The template contains Template Variables that allow the Editor to insert text, images and other content items outside of the main Content Area. These are identified in green and are inserted in the template with the following syntax [*TemplateVariableName*]
* The Editor can insert pre-set pieces of text or html into the Content Area or a Template Variable by using Chunks. In this example there are two Chunks identified in red. Chunks are inserted by the editor by typing into the Content Area or a Template Variable space.