Tutlist.com - Browse by Tag: php

1 UPs
-vs-
0 DOWNs

1 Votes

The concept is simple: include a hidden link to a robots.txt-forbidden directory somewhere on your pages. Bots that ignore or disobey your robots rules will crawl the link and fall into the trap, which then performs a WHOIS Lookup and records the event in the blackhole data file. Once added to the blacklist data file, bad bots immediately are denied access to your site. I call it the “one-strike” rule: bots have one chance to follow the robots.txt protocol, check the site’s robots.txt file, and obey its directives. Failure to comply results in immediate banishment. The best part is that the Blackhole only affects bad bots: normal users never see the hidden link, and good bots obey the robots rules in the first place.

1 UPs
-vs-
0 DOWNs

1 Votes

Creating an ORM for PHP is not an everyday task but writing one is a good way to improve your PHP skills, especially if you use some of the additional features PHP 5.3 adds to the language. There are many excellent ORMs (Object Relational Mappings) already in existence and for a real-world project it would probably better to use one of these, but this tutorial uses the task of creating an ORM as a way to take a look at applications for some PHP 5.3 features.

3 UPs
-vs-
0 DOWNs

3 Votes

In an effort to tie the website and blog together, developers commonly throw together some quick PHP/MySQL programming to pull in recent blog post titles and links to the individual posts. Here’s the PHP and MySQL that accomplishes that task.

3 UPs
-vs-
0 DOWNs

3 Votes

The hottest device out there right now seems to be the iPad. iPad this, iPad that, iPod your mom. Here David demonstrates php and javascript detection methods for the iPad.

2 UPs
-vs-
0 DOWNs

2 Votes

The Model-View-Controller architectural pattern, usually referred to with the MVC acronym, is the foundation of many web frameworks and in particular of the first generation of PHP-based ones. Here the author explores some implementations and discovers how pure the PHP approach is in relation to the original idea and the standards from other languages.

TAGS: php patterns mvc

0 UPs
-vs-
0 DOWNs

0 Votes

Regular Expressions are the Swiss Army knife for searching through information for certain patterns. They have a wide arsenal of tools, some of which often go undiscovered or underutilized.

2 UPs
-vs-
0 DOWNs

2 Votes

Lucene is not a database. It's an index. All field types other than unindexed are stored in a very efficient way, using minimal hashes to reflect each individual word type. When a search is made, the query is also transformed such that it will match those unique hashes of the data. Anything that you're not indexing should be something you're going to use to recover information from a database. Because we are going to normalize our data, this will be basically anything we'll be recovering about the document to display in a search result. Relying on the database to populate these fields will decrease your index size (and thus increase your search speed) by an order of magnitude.

0 UPs
-vs-
0 DOWNs

0 Votes

An article that details all the uses of PHP would be as long as the New York City phonebook, and about as exciting to read. And while we have tutorials on PHP planned for the future, we thought we’d start everyone off with six fun and easy PHP tricks you can try right now, no matter what your familiarity with the language is.

0 UPs
-vs-
0 DOWNs

0 Votes

When scripting in PHP, we often restrict ourselves to a limited number of API functions: the common ones, like print(), header(), define(), isset(), htmlspecialchars(), etc. If some needed functionality doesn’t exist, we often write it making use of these basic components which we have in mind. The PHP API actually offers a lot of functionality, some useless and some useful; often seldom used. I have been looking through the available functions and was interested to find some really cool functions that I should have known about. Here, I share my findings.

TAGS: php functins

2 UPs
-vs-
0 DOWNs

2 Votes

As exceptions are new in PHP 5, they are primarily for userland code (PHP code you write). As new versions of PHP get released, more and more internal code should be switched over to use exceptions so that you have a chance to handle errors smoothly, but this is a gradual process.

« previous 1 2 3 4 5 6 7 8 9 10 next »

Popular Tut Tags

TUTlist on twitter

For all the newest TUTs, follow @tutlist

King Tuts

JohnGalt (105 Tuts)
JDStraughan (96 Tuts)
linkbuild (48 Tuts)
TJHooker (47 Tuts)
girish (39 Tuts)

TUTmark

Drag TUTmark to your bookmarks
to begin using our bookmarklet.

Don't know how to use a bookmarklet?
Check out this tutorial.

TUTlist News Feeds

Home Page (RSS and ATOM)
New TUTS (RSS and ATOM)
Subscribe by Email

Advertise HERE!

To learn how to get your ad here.
CONTACT US TODAY!