PHP Web Development Tutorials

PHP Web Development Tutorials and Articles
  Title / Author Replies
Views
Sometimes you just need to know what country your site visitors are coming from - for example, if you're trying to implement geo-targeted advertising. This article will show you how. Sometimes you just need to know what country your site visitors are coming from - for example, if you're trying...
23
64,051
Say if you want to generate graph on your website using data from a data base, you might be wondering how to go about it. Well the best way I would do it is use free PHP GD library. Here is a class i wrote to generate a graph in a PNG image for me. class BarGraph { var $barWidth; var...
5
41,969
Introduction Suppose you want to know the age of a person given her birth date. Letís say her birth date is "09-23-1969". Although in this case you might say that we donít need a program to compute the age, but assuming there are 1000s of records in your database and for every person you have to...
0
65,371
There are many different traffic analysis tools, ranging from simple counters to complete traffic analyzers. Although there are some free ones, most of them come with a price tag. Why not do it yourself? With PHP, you can easily create a log file within minutes. In this article I will show you how!...
14
38,336
This is a very simple code and hardly requires any explanations. :eek: If you need any put the post here. functions.php <?php function createsessions($username,$password) { //Add additional member to Session array as per requirement session_register();
135
122,370
If you want to validate a form without submitting it, you can use two methods, one is pure client side JavaScript and the other being a mix of JavaScript and server-side scripting which can be PHP,ASP.JSP,Perl or anything for that matter. First I will give an example of pure JavaScript...
21
237,507
At some point, most developers have a need to create graphs. I've known some to get frustrated and end up exporting the data to a spreadsheet, rather than relying upon the graphing capabilities of Open Office or Excel. That can be the way to go in certain cases, but not because there's no...
1
12,669
The below is a code to gauge ur php performance <?php function micro_time_val($mytime) { $gettime=explode(" ",$mytime); $msec=(double)$gettime; $sec=(double)$gettime; return ($sec + $msec);
8
3,416
Management of files Manipulating files is a basic necessity for programmers and PHP gives you a great deal of tools for creating, uploading, and editing files. When you are manipulating files you must be very careful because you can do a lot of damage if you do some errors. Common errors include...
0
8,450
I was wondering in how many ways can we iterate through an array in PHP. So, I figured out a few, here's it... Our Array, which we will be iterating on, $arr = array('PHP','Perl', 'JavaScript','AJAX', 'Python','ASP', 'C#'); 1. Using a simple for loop // using for loop ...
1
23,435
A trend with a lot of new Web Designers is to blindly go for ASP or JSP for creating dynamic and interactive websites. Why use PHP for server-side scripting? This question comes in mind of a lot of Web Designers, especially in mind of designers/programmers who are only exposed to much hyped server...
14
21,734
Recently, an obscure detail in the way PHP processes strings came to my attention. This is processed by code that checks for simple lists (like 1. blah 2. blah, or - blah - blah, etc.). However, an innocent call to in_array($x, array('1.', '0.')) had surprising and unexpected results: our...
1
10,217
I am listing tips to improve your PHP code performance. There are few whom you can call as debatable but overall the code performance will surely increase. Following tips are written to save time and development cost (includes memory too) If a method can be static, declare it static. Speed...
18
29,654
Every web-applications needs to transfer data from one page to another and one of the way of doing it is using sessions in PHP.. Sessions are a special type of variables used to transfer/carry data from one page to others.. In this tutorial i’ll be covering PHP version 4.1.0 and above.. Using...
10
6,970
System tools & monitoring programs are often required to monitor a directory or file(s) for changes, not just content changes, it may even be attribute changes like permissions, timestamps etc. Inotify is being used for quite some time in C programming to achieve the same. Here we will be...
1
3,326
Most applications like browsers, text editors, etc. come built in with spelling suggestions, they highlight a possible incorrect English word (any language for that matter) and offers a list of suggestions when clicked or selected. Even, search engines provide spelling suggestions. Even you...
0
9,196
PDO or PHP Data Objects is a data abstraction layer, i.e. it provides uniform methods to access different types of databases, as a result switching between or moving to a different database system is relatively easier. So, in simple language the code to access a SQLite db will also work for MySQL...
1
8,925
Cookies are basically small files which are stored in User’s Computer. Their main purpose is to hold data specific to a particular client and Website, They can only be accessed either by Web Server or the client computer. This allows the server to access user specific data while saving space on the...
7
4,902
Parsing HTML has always been a tough cookie even for seasoned programmers, but nowadays parsing HTML is extensively used for scraping websites, crawling, error detection websites, and many other useful purposes. In this article we'll be looking into parsing HTML using PHP, for this purpose I...
0
2,505
To display the data by splitting them in pages is very important if you have chances of more records to be displayed. function page_records() { global $page,$pagecount,$perpage; $arr = $_GET; if (is_array($arr)) { foreach($arr AS $_arrykey => $_arryval) {
0
8,605