730 PHP Tutorials. Page 6More than 730 titles from different sources. Prepared by gotAPI.com |
|
|
1 - 75 76 - 150 151 - 225 226 - 300 301 - 375 376 - 450 451 - 525 526 - 600 601 - 675 676 - 750 www.gotAPI.com |
Mass Customization
Isn t it great to go to a web site and it appears as though it was designed just for you. This article will help you design a web site which makes visitors feel like it was designed just for them. First, lets scope out the project. You will need a mysql database, a table to store the visitor s information, and php3 or php4 (I will explain how to use features of both). This application will gather information about a visitor so the experience wil...
Migrating to Page Controllers
Mixed code/HTML tools--PHP, JSP, ASP, and so on--give web developers the power to create dynamic sites with little effort. They also make it easy to slip into bad habits. Consider the all-in-one page, or Model 1 architecture, in which a lone page handles an entire action by itself, typically in poor fashion. An example page might display a form, validate the submission, process the data, and show the user a thank-you message. // ); //]] Develope...
Miles To Go Before I Sleep...
Web-based calendars are all the rage nowadays. Somehow, there s something very seductive about putting your schedule together on your computer, uploading it to the Web, and accessing it from anywhere on the planet. And with WAP quickly becoming commonplace, you don t even need a Web browser any more - your cellphone has everything you need to connect to your online calendar and make that meeting on time...
Mini Shopping Basket with only PHP4 Sessions
If you haven t done your own shopping basket with PHP yet, you should be able to build one after reading this article. Even if you have a basket already, some of the tips I provide here could help you improve your system. I will give you some hints about how you could perhaps save yourself endless queries to the basket table or having endless text files that fill up your file system, because the application just does not remove them. If you re n...
Modular PHP Development with FastTemplate
I don t know about you, but all these documents about dividing web programming into logic, presentation, and content always irritate me. Most of them miss an important point: often at least three people develop a web page--the programmer (i.e, the PHP or Perl guru), the web designer who provides the presentation (the HTML designer), and the content developer (perhaps a marketing person). If you re working for a multilingual company, you probably ...
Monitor PHP Application Errors and Messages with syslog
If nothing else, programmers are eternal optimists. We enter each project somehow convinced of a perfect outcome, despite the often considerable technical and logistical difficulties inherent to our profession. Computer Science is after all still in its infancy, and our tools, not to mention development techniques, remain quite immature. Resultingly, one outcome that you can be sure of as you embark on the next pursuit of programming perfection ...
More about PEAR s Image_Graph
I ve fallen in love with PEAR s Image_Graph package. More than once I ve come up against a requirement, and then found that the developers have implemented a solution in quite an elegant way. They d be the first to admit there s still lots to do - the package is after all still an alpha release. But it s achieved a lot, so I can t resist taking it on a second date. After last month s introduction, this time I look a little deeper into the availab...
More Examples of Creating Command Objects with PHP 5
Are you one of those PHP developers who wants to expand your background in design patterns by learning an additional one? If your answer is affirmative, then this series might be appealing to you. It will teach you, in three educational tutorials, how to create and implement command objects with PHP 5.
Multiple File PHP Scripts
Although it s not ever truly necessary, many times it becomes very important to have the ability to separate PHP code into multiple files to ease organization and promote the idea of reusing common functions within your PHP scripts. // ); //]] Thankfully, PHP supports four different language constructs and functions to allow for the import of code from other files, which I will discuss now. Including Code in Your PHP Script There are many ways ...
MySQL and PostgreSQL Compared
Which database do I use: Postgres or MySQL? This age-old question has plagued developers for, what, at least a couple years now. I ve used both databases extensively (MySQL for about one year and Postgres for about 2 years) and was curious if the performance differences between the two were as stark as the MySQL website suggests. I had actually benchmarked the two databases back in September 1999 when we were starting to lay the groundwork for S...
MySQL Date and Time Functions, Part 1
There are a number of useful date and time functions in MySQL. I ve seen too many applications performing date calculations at the code level when the same can be done using built-in MySQL functions. Before we launch into the functions, however, let s refresh our memory and look at which date and time types are available to MySQL. DATETIMEYYYY-MM-DD HH:MM:SS DATEYYYY-MM-DD TIMESTAMPYYYYMMDDHHSSMM TIMEHH:MM:SS YEARYYYY The TIMESTAMP column stores...
MySQL Date and Time Functions, Part 2
Last time we looked at a few of the more commonly used date and time functions. This time we re going to look at some of the less well-known functions. First, we will need to understand the various date and time types MySQL accepts for passing to many of these functions. SECONDss MINUTEmm HOURhh DAYDD MONTHMM YEARYY MINUTE_SECONDmm:ss HOUR_MINUTEhh:mm DAY_HOURDD:hh YEAR_MONTHYYYY-MM HOUR_SECONDhh:ss DAY_MINUTEDD hh:mm DAY_SECONDDD hh:mm:ss As yo...
Native Language Support
Didimo Emilio Grimaldo Tunon PHP is a great language for developing dynamic web sites. Some do it for fun while others for business. It is true that a great part of the web is in English. However, if you are targeting a worldwide audience, then neither English nor Esperanto alone is an option. If you need to deliver content in several languages, it is a good idea to explore several alternatives. However, some alternatives may not be suitable for...
Nominations for Developer.com Product of the Year Have Begun!
What makes a development product worth its weight in gold? Is it... Performance? Reliability? Adherence to standards? Shortcuts? Value? Ease of use? Security? Bells and whistles? For those who program for a living this gold should be 24 carat. Developer.com wants to acknowledge those development programs and tools that are 24 carat gold. Each year we do that by awarding companies or groups who we, with the help of our readers, feel are worthy to ...
Nuking The Competition
If you re a fan of open-source technology, you re probably familiar with Slashdot (
Object Interaction and Mediator Classes in PHP 5
Are you looking for an approachable guide on how to use the mediator design pattern in PHP 5? If you answered yes, then you should take a look at this group of articles. Welcome to the final part of the series that began with Introducing Mediator Classes in PHP 5. This series takes you through building mediator classes with PHP, and shows you how to use this useful pattern with copious code samples.
Object Interaction in PHP: Introduction to Aggregation, part 1
Aggregation in PHP allows one object to use another object. It s a very powerful concept. This article, the first in the series, serves as an introduction to some of the things you can do with aggregation.
Object Interaction in PHP: Introduction to Aggregation, part 2
In this second part of his series, Alejandro Gervasio gets a little more technical with the basics of Aggregation. He begins working with a MySQL abstraction class and a useful paging class, and is starting to get into writing portable code and introducing the technique of aggregation.
Object Interaction in PHP: Introduction to Aggregation, part 3
In the third part of his series, Alejandro Gervasio digs a bit further into object-oriented PHP. He explains the barebones of a paging class and techniques used to aggregate a new MySQLConnector class.
Object Interaction in PHP: Introduction to Aggregation, part 4
In the fourth and final article in our series covering aggregation in PHP, Alejandro Gervasio reviews the MySQLConnector and Pager classes. He then uses these classes first to build a simple database, then to display some paged results from the database.
Object Interaction in PHP: Introduction to Composition
Composition is an important concept in PHP. It occurs when an object creates another object; that is, the first object completely possesses the second object. In this article (the first of two parts), Alejandro Gervasio explains composition, and shows some examples to illustrate his points.
Object Interaction in PHP: Introduction to Composition, conclusion
In the first article of this series, the concept of composition in object-oriented programming was explained, and illustrated with an example that implemented composition using two simple classes. In this article, we will create a MySQL database wrapping class that uses the concept of composition.
Object-Oriented Features New To PHP5
This chapter is excerpted from Object-Oriented PHP: Concepts, Techniques, and Code from NoStarch Press. PHP 3 was released in mid-1998. Some basic object-oriented (OO) capabilities were included, more or less as an afterthought, to provide new ways of accessing arrays.1 No significant changes were made to the object model when version 4 was released in mid-2000. The basics of object-oriented programming (OOP) were there--you could create a clas...
Object Oriented PHP
OK, so you ve heard all about it, you think you ve got your head around it. Everyone you speak to says it s the way real developers develop. How do you do it? What s in it for you? And how the hell do you do it with PHP? Broadly speaking, all of the above statements are true, but I guess if you re not familiar with OO you want to see a concrete example - and ideally something, which you can fit into your own page(s). Well, here goes. Let s start...
Object Oriented Programming in PHP: The Way to Large PHP Projects
This arcticle introduces Object Oriented Programming (OOP) in PHP. I will show you how to code less and better by using some OOP concepts and PHP tricks. Good luck! Concepts of object oriented programming: There re differences between authors, I can mention that a OOP language must have: Abstract data types and information hidding Inheritance Polymorphism The encapsulation is done in php using classes: ?phpclass Something { ...
Object-Oriented Programming Through Design Patterns
If you re looking for an overview of the new object-oriented features of PHP 5, you ve found a good place to start. This article, the first of several parts, is excerpted from chapter two of the book
Object Overloading in PHP 5
A fine implementation of the object-overloading paradigm has found its way into PHP version 5. This article explores the possibilities of the overload methods __call(), __set(), and __get(). After explaining the basic theory of overloading, it dives straight into the topic by using two practical examples: first, implementing persistable classes, and second, figuring out a way to realize dynamic getter and setter methods. If you do not yet know wh...
ODBC Socket Server
System Administration: It s a dirty job, but someone said I had to do it Seen on a T-shirt One of the most commonly faced dilemmas of system administrators is making dissimilar operating systems and tools work with each other. It is my hope that this article will make those system adminstrators jobs a little easier when it comes to making Access and PHP work together. If you want to use your Microsoft Access database with PHP you have a limit...
On the Security of PHP, Part 1
PHP has achieved a stable and solid presence on the Web in the last several years, and its popularity as a server-side scripting language is only increasing. Its primary use is for providing dynamically generated interfaces between Web users and the host. As such, PHP scripts fall a natural prey to many Internet attacks. Despite the fact that the language is designed with security in mind, a familiarity with its more dangerous aspects and conform...
On the Security of PHP, Part 2
Review Part 1. Secure Programming Guidelines The way to secure PHP scripts is through a carefully selected combination of configuration settings and safe programming practices. Based on the vulnerabilities that we have studied so far, we will now set forth to establish some rules that can help avoid dangerous situations. Using PHP Safe Mode PHP can be set up so that it executes scripts in a restricted environment to decrease the amount of damage ...
On User-Defined Timezones in PHP
David Whittington and Luke Ehresman ABSTRACT PHP provides some nice date manipulation functions that work very well in combination with each other. However, they only handle dealing with the server s timezone. Adding the feature for shifting dates to a user-defined timezone can be a very unpleasant experience, as we know first hand. In this article, we discuss the problems we encountered, and present our solution. Introduction We work for a soft...
OO Design: Abstract Classes
PHP has evolved into a feature-rich, widely deployed web development solution. With each new version released, new features appear, while existing features are improved. PHP s object support is one such feature that has been improved. Object oriented support first appeared in PHP3. PHP4 made additional improvements, such as the way constructors are handled. In fact, the up and coming Zend Engine 2.0 introduces a new object model, more similar to...
Open Source Databases: As The Tables Turn
My July Article comparing PostgreSQL and MySQL caused a stir that really surprised me. Of course, users of both databases called the tests rigged one way or the other, even though I noted that both databases had their strong points under various circumstances. All that aside, we ve been running into some rather grim and serious MySQL problems on SourceForge - most of which are directly related to MySQL s table-level locking mechanism. To give us...
Optimizing Postgresql
Ericson Smith Following Tim Perdue s excellent article on the comparison between MySQL and Postgresql, I decided to take a shot at installing and using this database. For most of our work I use MySQL and will continue to do so, because of its ease of use and unrivaled select query speed, and also because there is no point in trying to mess around with production systems that already work fine. But some new projects suffered greatly from MySQL s ...
Optimizing System Performance
In this second part of a two part series, you ll learn how to use debuggers and optimize performance. It is excerpted from chapter 12 of the book
Ordering Columns in DDBB Search Results
This article will show you the fastest way to order your database results, via JavaScript (with some work in PHP). It adds some more work to your script, but once you see the results you won t use the approach of adding the ORDER By clause anymore.
Output Buffering With PHP
Hate those ugly error messages that PHP generates when it encounters an error in your scripts? Can t stand half-constructed Web pages? Well, maybe you should take a look at PHP s output control functions, which offer an interesting and powerful solution to the problem. You don t have to look at the numbers any more to gauge PHP s popularity - a quick scan of the manual pages provides more than enough evidence that developers all over the world ar...
Output Caching with PHP
Dynamic Web pages take longer to load than static ones, which forces visitors to your site to wait -- and we all know they won t wait for very long. Output caching is a powerful technique you can use to shorten that wait and keep them from leaving.
Overloading and Object-Oriented Programming with PHP 5
Last week, we discussed design patterns and polymorphism. This week, we examine overloading and more. This article, the last of four parts, is excerpted from chapter two of the book
Overloading Classes in PHP 5
Welcome to the last installment of the series Overloading classes in PHP. Comprised of three tutorials, this series shows you how to overload your classes whether you re using PHP 4 or PHP 5, and explains in detail the implementation of the __set() , __get() and __call() methods, in order to overload property accesses and method calls respectively.
Paginating MySQL Data with PHP
Have a large MySQL dataset that you would like to display on your website, but don t want to bog down your users connections with large HTML renderings? Try paginating your data. As a PHP and MySQL Developer I browse around many forums and one of the more common questions being asked is How do I Add Next / Prev Links to my Pages? . Even I asked this very question a long time ago when I was beginning to learn PHP. I decided to write this article...
Pagination of Results on a Web Page
When creating browse or search functionality on a website, you many find that you end up with more data than the page can easily display at once. In these situations it makes for a better user experience to give users only a certain number of results and then present them with options to see the next and/or previous pages. Listing 9.5.1 is an example of this that assumes that you have all your data in an array in the first place and just want to...
PDF Generation With PHP
One of the reasons I like PHP so much is its consistent support for new technologies. The language invites extensibility, making it easy for developers to add new modules to the core engine, and widespread community support has made PHP one of the most full-featured Web programming languages around, with support for a wide variety of modular extensions. Extensions available today allow developers to use PHP to perform IMAP and POP3 operations; dy...
Pear::DB Primer
Often I have been a victim of badly designed code or by changes made to the initial specification of a project. Sometimes my personal pet project changes hosting providers and because of that, it needs to use a different database server, or a corporate project changes its direction and consequently its platform. In any case, I end up changing database servers. // ); //]] Things like these happen very frequently in the IT world. People start out ...
PEAR Primer
In this article I m going to lay out how you can go about using this great library in your own classes. Specifically, we will be covering PEAR, PEAR_Error, DB, and Log. One thing to note here is that if you don t know what OOP stands for or you have yet to dive into PHP OOP programming this will most likely go over your head. Starting with an OOP primer would be a good idea. [ Next Page ] Comments: One (more) small flawStevenv Vasilogianis04/26/...
PEAR s HTML_QuickForm
Programmers are often told not to reinvent the wheel, and that the best programmers borrow from others before they start to build something themselves. PHP, being primarily a web language, sees a lot of reinventing in regards to form display, processing and validation. However, there s a great PEAR package that needs a little more exposure: HTML_QuickForm. It makes handling the rendering and display of forms, and more usefully, both client and s...
Peeking at Pear
True power in a programming language comes from its extensibility. A good programming language can be expanded and extended in ways the designer never could have imagined originally. If you have ever programmed in Perl, chances are you have heard of CPAN, the Comprehensive Perl Archive Network. As you know, it s an easy way to add functionality to Perl. Most Perl programmers can t see how they ever lived without it. PHP has a similar capability. ...
Performing HTTP Geocoding with the Google Maps API
The previous installment of this ongoing series covering the Google Maps API (Part 1, Part 2, Part 3, Part 4, Part 5), I introduced the API s new geocoding feature, released this past June 11. In this tutorial I showed you how to submit geocoding requests via JavaScript, which is convenient because it s easy to subsequently build a map using the retrieved coordinates. However, if you re interested in performing bulk geocoding for reason of stori...
Phorm Manager
In the last article, the Phanatic was leading an expedition into a largely uncharted area. The conceptual project was a generalized form handler. The task s starting point was Matt Wright s famous formmail and included adding many more bells and whistles. While putting together the last tome, time and space were closing in on us, and in an effort not to strain the Phanatic s rapidly aging brain, we pulled into shore for a rest. Let s review the...
php
Understanding MVC in PHP (120 tags)PHP Form Handling (43 tags)Very Dynamic Web Interfaces (39 tags)Creating and Consuming Web Services With PHP (36 tags)PHP Web Services Without SOAP (34 tags)View Alldebugging Articles that share the tag debugging:Interactive Debugging in Python (48 tags)Unraveling Code with the Debugger (12 tags)Debugging and Profiling mod_p
php
Understanding MVC in PHP (120 tags)PHP Form Handling (43 tags)Very Dynamic Web Interfaces (39 tags)Creating and Consuming Web Services With PHP (36 tags)PHP Web Services Without SOAP (34 tags)View All Sponsored Resources Inside Lightroom Related to this Article a href=http://www.oreilly.com/catalog/tagclou
PHP, MySQL and images
Joe s used auto sales, an average sized car yard of around 150 cars has decided to make the big leap into the new millennium. First of all they had to get themselves a nice new computer, with that new computer came the Internet. After a few weeks of searching the internet they decided to go all out, now they wanted a web site of their own. And it just so happens that Joe s good friend knows a little HTML, three days later Joe s used ...
PHP: The need for speed
One of the greatest advantages when using PHP is obviously speed. PHP4 is in general fast enough for dynamic web content generation, and in most cases you can t even think of anything faster than it. But when you have to face lots of accesses, heavy applications, narrow bandwidth, or other factors that can create performance bottlenecks, you may ask yourself if you can do anything to make things work better. In this article I ll explain what you...
PHP 101 (Part 1) - Secret Agent Man
Ever since Web designers found out about the FORM tag, the Internet has seen an explosion in the number of Web sites that depend heavily on user response and interactivity. For a long time, the primary language used to develop such Web sites was
PHP 101 (Part 2) - Shakespeare s Rose
In last time s lesson, we taught you the basics of PHP variables, and showed you how to add, multiply and concatenate them together. We also introduced you to Her Majesty s most endearing secret agent, and demonstrated just how useful the require() and include() functions are.
PHP 101 (part 3) - Chocolate Fudge And Time Machines
After teaching you the fundamentals of form processing, PHP 101 returns with an explanation of WHILE, FOR and FOREACH loops, those PHP constructs that can save you hours of unnecessary HTML coding. Also included: array variables, the auto-increment operator, and some yummy desserts. If you ve been paying attention, you ll remember that last time, we gave you a quick crash course in PHP s conditional statements and operators; we also showed you ho...
PHP 101 (part 4) - Look, Ma...It s Alive!
One of the most compelling things PHP has going for it is it support for a wide variety of databases. And this week, PHP 101 is going to take advantage of that database support to create dynamic data-driven Web sites. This primer covers different techniques to select, insert and delete records, together with some tips to track and squash bugs when building SQL-driven sites. One of the most important factors driving PHP s popularity over the last ...
PHP 101 (part 5) - The Wonderland Factor
If you ve been following along, you already know how PHP can be used to extract data from a database...it s as easy as apple pie. But in the real world, data isn t always stored in neat rows and columns, and you re quite likely to come across situations where the data you need is actually stored in a bunch of ASCII text files.
PHP3 Introduction
PHP3.0, one of the hottest scripting languages to be found on the Internet, lends a great many capabilities to the web programmer. Many of these tasks, accomplished with some degree of difficulty in many other languages, can be swiftly executed with but a few lines of PHP3.0 code . The fact that PHP3.0 code can be inserted directly alongside HTML makes the language all the more convenient.
PHP 4.0 Overview
A lot of you were probably wondering about the recent announcements and discussions about the future of the PHP scripting language. Youve probably heard the word Zend at some point, a few shreds of information about new features and functionalities, and thats about it. In this article Ill try to lay out the way I see the future of PHP in its upcoming release, version 4.0. So, whats Zend? Even though I hope tha...
PHP 4.3 and Mac OS X
With the recent release of PHP 4.3, Macintosh users can now configure and build PHP themselves. This is a great boon. Finally, Mac OS X users have the same level of PHP support that people who run Linux and Windows enjoy. // ); //]] If you wanted to use earlier versions of PHP on Mac OS X, you either needed to run the pre-compiled module provided by Apple or download a special, hand-built version made by helpful users. Apple only supplies PHP 4....
PHP 5: A Sign that PHP Could Soon be Owned by Sun
PHP 5 s official release occurred on July 13th with a complete re-haul of object-oriented programming features and improved MySQL functions. These are sure to be great additions to the package for PHP developers. However, many of the changes to PHP are hinting to something that may not necessarily be something PHP developers will like down the road.
PHP 5 and Polymorphism
This article explains what polymorphism is and how it applies to object oriented design in particular. It also explains the pros and cons of polymorphism when working with certain versions of PHP.
PHP 5 OOP: Delegation and Custom Exceptions
This article continues a series on PHP5 OOP. In the first article, PHP 5 OOP: Interfaces Abstract Classes and the Adapter Pattern, I presented an interface for abstracting database access from the actual database. In the second article, PHP 5 OOP: Protecting Data With Visibility , I showed how to expand upon the functionality built in the first article in order to show how to protect your data using visibility modifiers. In this article you will ...
PHP 5 OOP: Interfaces Abstract Classes and the Adapter Pattern
PHP 5 made significant improvements on the Object Orientated programming model of PHP 4 bringing it more in line with languages such as Visual Basic .NET and Java. The improved object model in PHP 5 makes developing applications using OOP much easier and gives you the programmer, greater flexibility. In this series of articles I will demonstrate the new features of the PHP 5 object and show you how to create a database abstraction layer similar t...
PHP 5 OOP: Protecting Data With Visibility
This article continues the discussion of using PHP to create a database abstraction layer by using the OOP features of PHP. In the prior article, PHP 5 OOP: Interfaces Abstract Classes and the Adapter Pattern, I presented an interface for abstracting database access from the actual database. The article also presented code for accessing a database. In this article you will learn to expand upon the functionality you built from the first article in...
PHP 5 OOP: The Template Pattern
This article concludes a series on PHP5 OOP. In the first article, PHP 5 OOP: Interfaces Abstract Classes and the Adapter Pattern, I presented an interface for abstracting database access from the actual database. In the second article, PHP 5 OOP: Protecting Data With Visibility, I showed how to expand upon the functionality built in the first article in order to show how to protect your data using visibility modifiers. In the third article, ...
PHP and COM
You ll remember how, just a few weeks ago, I was playing around with PHP s Java extension, using it to access Java classes and class methods through my PHP scripts. At that time, I thought that PHP s Java extension was a powerful demonstration of the way PHP could be integrated with other technologies. But little did I know that that was just the tip of the iceberg...
PHP and Heredocs
PHP is wonderful for generating dynamic web pages. The ability to combine the PHP, HTML, and SQL statements within a script provides a lot of power. Combining everything in one file, however, can make a big mess. Having separate files for PHP classes, HTML blocks, and SQL statements can go a long way towards cleaner, more understandable web application design and implementation. This article explains the use of heredocs and associative arrays in ...
PHP and Java
The Java extension is an extremely exciting tool. By learning how to use this module, you can extend PHP by the power of all available Java classes. To show you the basics of the Java extension, this article will cover installation and a few code examples of using PHP and Java together. Windows Installation The following configuration has been tested with Apache 1.3.12, PHP 4.0.3 binaries from www.php4win.de plus the 4.0.3 Zend Optimiser and JDK...
PHP and Java
Do PHP developers ever sleep? I m starting to wonder what these caffeine-entranced insomniacs are going to think of next. I m asking this question because I can t seem to understand how PHP always seems to have just the right extension to accomplish the task at-hand. Mathematical functions? No problem. Databasing? Simple. Butter my toast? Well, we re not that far yet, but give some PHP programmer a spare weekend locked away in his office, and som...
PHP and JavaScript, Pooling Your Resources
As a web programmer, a wide variety of scripting languages are available for you to use. Each language has limitations, but by using more than one in conjunction many of those limitations may be overcome. This article will discuss the benefits of using two such languages, PHP and JavaScript, as well as provide source code for creating a basic demo application.
PHP and JavaScript, Pooling Your Resources (continued)
In this article, you will learn how to combine PHP and JavaScript to create two SELECT menus, one containing categories, and the other containing only those options applicable to the category selected.
PHP and JavaScript Interaction: Storing Data in the Client, part 1
Modern websites demand heavy interaction between server-side and client-side programming. In the first part of this article series, we will implement a simple mechanism to make PHP and JavaScript interact, creating a function which can build an array structure and store information in it. It will allow for programmatic data manipulation without server interaction.
|