PHP Online Resources

The major sites that use PHP, and a listing of all the books written on PHP. Not only does this site contain a plethora of resources, it also contains links to the other PHP sites, the latest news about all things PHP

The Official PHP Web Site





The Zend Web Site

The Zend engine is the engine that powers PHP. The Zend Web site is the site of the company that puts out the Zend engine, as well as many other tools. For example, at this site you can also download the Zend Optimizer, which gives your PHP scripts a 40-100% increase in speed on average.




PHPBuilder

The documentation on PHP is an awesome reference, but some of the more abstract concepts of PHP can't be covered by a simple function reference; they need to be explained by experts who have been there and done that. PHPBuilder offers an impressive set of tutorials ranging in level from beginner to advanced.




PHPWizard.net

This site contains an excellent repository of daily tips and tricks. In addition to the daily tips, this Web site contains high-quality programs such as an online quiz system and an online chat program.




The PHP Class Repository

This Web site in search of classes that will make  life easier. 



DevShed

DevShed is an excellent resource for all things open source including Perl, Python, Jserv, Zope, and, of course, PHP. It contains a nice repository of introductory PHP tutorials and an active message board.




Related Posts:
  • Control Structures if else elseif/else if Alternative syntax for control structures while do-while for foreach break continue switch declare return require include require_ once include_ once goto … Read More
  • Setting Default Values for Function Parameters Assign the default value to the parameters inside the function prototype: function wrap_html_tag($string, $tag = 'b') { return "<$tag>$string</$tag>"; }     The example in the Solution sets the… Read More
  • convert time in php <?php $thishour = time() + (4*60*60); $newTime = date("d m Y H:i:s",$thishour); echo $newTime; ?>); … Read More
  • You want to extract part of a string, starting at a particular place in the string Use substr( ) to select your substrings: $substring = substr($string,$start,$length); $username = substr($_REQUEST['username'],0,8); … Read More
  • Changing File Permissions by php Use chmod( ) to change the permissions of a file:  chmod('/home/user/secrets.txt',0400);   Use chown( ) to change a file's owner and chgrp( ) to change a file's group: <?php chown('/tmp/myfile.txt','skla… Read More
  • Opening a Remote File You want to open a file that's accessible to you via HTTP or FTP. Pass the file's URL to fopen( ):  $fh = fopen('http://www.example.com/robots.txt','r') or die($php_errormsg);     When fopen( ) is passed … Read More
  • PHP Redirect - Redirect Script? PHP Redirect Function header('Location: destination.php'); exit();   ou need the Location: part so the browser knows what header it's  receiving. Also, don't forget to  do an exit() or die() right after… Read More
  • XML file using the DOM API //Use PHP's DOM XML extension. Here's how to read XML from a file: $dom = domxml_open_file('books.xml'); //Here's how to read XML from a variable: $dom = domxml_open_mem($books); //You can also get just a single node. H… Read More
  • Checking if a Host Is Alive Use PEAR's Net_Ping package: require 'Net/Ping.php'; $ping = new Net_Ping; if ($ping->checkhost('www.oreilly.com')) { print 'Reachable'; } else { print 'Unreachable'; } $data = $ping->ping('www.oreilly.com… Read More
  • keep your session secure php Use SSL when authenticating users or performing sensitive operations. Regenerate the session id whenever the security level changes (such as logging in). You can even regenerate the session id every request if you wish. H… Read More
  • Extracting Substrings You want to extract part of a string, starting at a particular place in the string. For example, you want the first eight characters of a username entered into a form.  Extracting a substring with substr( ) &l… Read More
  • Setting Environment Variables Setting environment variables in your server configuration on a host-by-host basis allows you to configure virtual hosts differently. <?php putenv('ORACLE_SID=ORACLE'); // configure oci extension ?>   Adjusting… Read More
  • Turning an Array into a String convert it into a  formatted string. Use join( ): // make a comma delimited list $string = join(',', $array); Or loop yourself: $string = ''; foreach ($array as $key => $value) { $string .= ",$value"; } $str… Read More
  • Php get_meta_tags-Extracts all meta tag content attributes get_meta_tags — Extracts all meta tag content attributes from a file and returns an array <?php// Assuming the above tags are at www.example.com$tags = get_meta_tags('htt… Read More
  • Finding the Position of a Value in an Array Use array_search( ) . It returns the key of the found value. If the value is not in the array, it returns false:   $position = array_search($value, $array); if ($position !== false) { // the element in position&n… Read More