70 PHP Tutorials at Its best

  1. Introduction To PHP
  2. Using HTML Forms With PHP
  3. Adding records to a MySQL database using PHP
  4. Setting Up Apache, PHP & MySQL On Windows
  5. Creating a PHP Looping Statement
  6. Introduction to PHP Variables
  7. Using PHP Operators
  8. Using Variable Referencing
  9. Working with PHP Datatypes
  10. File I/O in PHP
  11. What is Object Oriented Programming (OOP)?
  12. Convert Images to Thumbnails Images Using PHP
  13. PHP by example, Part I
  14. PHP By Example, Part 2
  15. Sorting an Array in PHP
  16. Putting PHP & MySQL To Work
  17. Generate Random Quotes with PHP
  18. How To Upload Files Using PHP
  19. A Class for Validating and Formatting Dates
  20. How Many Users Online?
  21. How to Show Random Images from a Folder
  22. Replacing Text in a MySQL Database Using PHP
  23. How To Backup Your MySQL Database With PHP
  24. Google Suggest With PHP
  25. Track Your Visitors, Using PHP
  26. PHP and Cookies, A Good Mix!
  27. Control Structures and While Loops
  28. Hightlight or Censor Words in PHP
  29. How to make a Hit Counter with PHP
  30. Basic Control Structures in PHP
  31. Developing a Login System with PHP and MySQL
  32. Upload Files to MySQL using PHP Tutorial
  33. PHP and MySql with PayPal
  34. Inserting An Array Into A Database
  35. Calculating Difference Between Two Dates Using PHP
  36. Programmatically Deciding Which Database to Connect in PHP
  37. Saving PHP Session Data to a Database
  38. Using Control Structures and Foreach Loops in PHP
  39. Storing Images in a Database
  40. Displaying Load Time with PHP
  41. Creating and Accessing MySQL Data with PHP
  42. Developing a Login System with PHP and MySQL
  43. Site Personalization With PHP
  44. How to Handle a Many-to-Many Relationship with PHP and MySQL
  45. Using PHP Objects to Access Your Database Tables (Part 1)
  46. Using PHP Objects to Access Your Database Tables (Part 2)
  47. The Explode Function, Split a String by String
  48. PHP Caching to Speed up Dynamically Generated Sites
  49. How to Setup and use Printing Variables in PHP
  50. Creating an Image Gallery with PHP
  51. Anti-Automated Registration
  52. Creating a Drop Down Selection with an Array
  53. Customizing the PHP Error Handler
  54. Checking Form Field Integrity within PHP
  55. Password Protection and File Inclusion With PHP
  56. How to Setup Variable Scope and Global Declarations
  57. Creating Dynamic Text Images
  58. Perfect PHP Pagination
  59. Image Manipulation with PHP The GD Libraries
  60. Simplified Image Resizing with PHP
  61. Verify a User’s Email Address Using PHP –
  62. Storing Hierarchical Data in a Database
  63. Managing Users with PHP Sessions and MySQL
  64. Generate PDFs with PHP
  65. Advanced email in PHP
  66. Creating a Credit Card Validation Class With PHP
  67. Using Regular Expressions in PHP
  68. Generating Spreadsheets with PHP and PEAR
  69. Getting Started with PEAR – PHP’s Low Hanging Fruit
  70. PHP Basic Pagination

HTTP status codes

When a request is made to your server for a page on your site (for instance, when a user accesses your page in a browser or when Googlebot crawls the page), your server returns an HTTP status code in response to the request.

This status code provides information about the status of the request. This status code gives Googlebot information about your site and the requested page.

Some common status codes are:

  • 200 – the server successfully returned the page
  • 404 – the requested page doesn’t exist
  • 503 – the server is temporarily unavailable

A complete list of HTTP status codes is below. Click the link for more information. You can also visit the W3C page on HTTP status codes for more information.

1xx (Provisional response)
Status codes that indicate a provisional response and require the requestor to take action to continue.

Code Description
100 (Continue) The requestor should continue with the request. The server returns this code to indicate that it has received the first part of a request and is waiting for the rest.
101 (Switching protocols) The requestor has asked the server to switch protocols and the server is acknowledging that it will do so.

2xx (Successful)

Status codes that indicate that the server successfully processed the request.

Code Description
200 (Successful) The server successfully processed the request. Generally, this means that the server provided the requested page. If you see this status for your robots.txt file, it means that Googlebot retrieved it successfully.
201 (Created) The request was successful and the server created a new resource.
202 (Accepted) The server has accepted the request, but hasn’t yet processed it.
203 (Non-authoritative information) The server successfully processed the request, but is returning information that may be from another source.
204 (No content) The server successfully processed the request, but isn’t returning any content.
205 (Reset content) The server successfully proccessed the request, but isn’t returning any content. Unlike a 204 response, this response requires that the requestor reset the document view (for instance, clear a form for new input).
206 (Partial content) The server successfully processed a partial GET request.

3xx (Redirected)
Further action is needed to fulfill the request. Often, these status codes are used for redirection. Google recommends that you use fewer than five redirects for each request. You can use Webmaster Tools to see if Googlebot is having trouble crawling your redirected pages. The Crawl errors page under Diagnostics lists URLs that Googlebot was unable to crawl due to redirect errors.

Code Description
300 (Multiple choices) The server has several actions available based on the request. The server may choose an action based on the requestor (user agent) or the server may present a list so the requestor can choose an action.
301 (Moved permanently) The requested page has been permanently moved to a new location. When the server returns this response (as a response to a GET or HEAD request), it automatically forwards the requestor to the new location. You should use this code to let Googlebot know that a page or site has permanently moved to a new location.
302 (Moved temporarily) The server is currently responding to the request with a page from a different location, but the requestor should continue to use the original location for future requests. This code is similar to a 301 in that for a GET or HEAD request, it automatically forwards the requestor to a different location, but you shouldn’t use it to tell the Googlebot that a page or site has moved because Googlebot will continue to crawl and index the original location.
303 (See other location) The server returns this code when the requestor should make a separate GET request to a different location to retrieve the response. For all requests other than a HEAD request, the server automatically forwards to the other location.
304 (Not modified) The requested page hasn’t been modified since the last request. When the server returns this response, it doesn’t return the contents of the page.

You should configure your server to return this response (called the If-Modified-Since HTTP header) when a page hasn’t changed since the last time the requestor asked for it. This saves you bandwidth and overhead because your server can tell Googlebot that a page hasn’t changed since the last time it was crawled

.

305 (Use proxy) The requestor can only access the requested page using a proxy. When the server returns this response, it also indicates the proxy that the requestor should use.
307 (Temporary redirect) The server is currently responding to the request with a page from a different location, but the requestor should continue to use the original location for future requests. This code is similar to a 301 in that for a GET or HEAD request, it automatically forwards the requestor to a different location, but you shouldn’t use it to tell the Googlebot that a page or site has moved because Googlebot will continue to crawl and index the original location.

4xx (Request error)
These status codes indicate that there was likely an error in the request which prevented the server from being able to process it.

Code Description
400 (Bad request) The server didn’t understand the syntax of the request.
401 (Not authorized) The request requires authentication. The server might return this response for a page behind a login.
403 (Forbidden) The server is refusing the request. If you see that Googlebot received this status code when trying to crawl valid pages of your site (you can see this on the Web crawl page under Diagnostics in Google Webmaster Tools), it’s possible that your server or host is blocking Googlebot’s access.
404 (Not found) The server can’t find the requested page. For instance, the server often returns this code if the request is for a page that doesn’t exist on the server.

If you don’t have a robots.txt file on your site and see this status on the robots.txt page of the Diagnostic tab in Google Webmaster Tools, this is the correct status. However, if you do have a robots.txt file and you see this status, then your robots.txt file may be named incorrectly or in the wrong location. (It should be at the top-level of the domain and named robots.txt.)

If you see this status for URLs that Googlebot tried to crawl (on the HTTP errors page of the Diagnostic tab), then Googlebot likely followed an invalid link from another page (either an old link or a mistyped one).

405 (Method not allowed) The method specified in the request is not allowed.
406 (Not acceptable) The requested page can’t respond with the content characteristics requested.
407 (Proxy authentication required) This status code is similar 401 (Not authorized); but specifies that the requestor has to authenticate using a proxy. When the server returns this response, it also indicates the proxy that the requestor should use.
408 (Request timeout) The server timed out waiting for the request.
409 (Conflict) The server encountered a conflict fulfilling the request. The server must include information about the conflict in the response. The server might return this code in response to a PUT request that conflicts with an earlier request, along with a list of differences between the requests.
410 (Gone) The server returns this response when the requested resource has been permanently removed. It is similar to a 404 (Not found) code, but is sometimes used in the place of a 404 for resources that used to exist but no longer do. If the resource has permanently moved, you should use a 301 to specify the resource’s new location.
411 (Length required) The server won’t accept the request without a valid Content-Length header field.
412 (Precondition failed) The server doesn’t meet one of the preconditions that the requestor put on the request.
413 (Request entity too large) The server can’t process the request because it is too large for the server to handle.
414 (Requested URI is too long) The requested URI (typically, a URL) is too long for the server to process.
415 (Unsupported media type) The request is in a format not support by the requested page.
416 (Requested range not satisfiable) The server returns this status code if the request is for a range not available for the page.
417 (Expectation failed) The server can’t meet the requirements of the Expect request-header field.

5xx (Server error)
These status codes indicate that the server had an internal error when trying to process the request. These errors tend to be with the server itself, not with the request.

Code Description
500 (Internal server error) The server encountered an error and can’t fulfill the request.
501 (Not implemented) The server doesn’t have the functionality to fulfill the request. For instance, the server might return this code when it doesn’t recognize the request method.
502 (Bad gateway) The server was acting as a gateway or proxy and received an invalid response from the upstream server.
503 (Service unavailable) The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.
504 (Gateway timeout) The server was acting as a gateway or proxy and didn’t receive a timely request from the upstream server.
505 (HTTP version not supported) The server doesn’t support the HTTP protocol version used in the request.

10 reasons to make your site mobile……

Here are ten reasons why you should get a .mobi domain name and make your site mobile:
1. There are four times as many mobile phones sold as PCs. That’s 1.3 billion people who can access the internet on their mobile phones.

2. The mobile web is a new marketing channel that’s predicted to generate $150 billion by 2011.

3. According to Nielsen, mobile internet extends the audience reach of many leading internet sites by an average of 13% over PC traffic alone. That means a mobile web site is likely to increase the overall size of your audience.

4. “.mobi” means “mobile” like “.com” means “commercial” on a “computer.”

5. .mobi is a trustmark that tells your customers your site works on mobile phones and that your content is relevant to their mobile context.

6. There are more than 80,000,000 .com, .net and .org sites, but less than 1% are mobile friendly. With a .mobi name and free dotMobi guides, your site will work on any phone with any operator.

7. You can have first mover advantage in the mobile space with the domain name you want. dotMobi has registered nearly one million names but great ones are available if you secure your names now.

8. Unlike m.domain.com or domain.com/mobile, a .mobi address means a site will work on mobile because dotMobi’s free guides ensure that mobile sites adhere to industry best practices and open standards. Oh, and .mobi is the only ICANN-approved naming convention for the mobile web.

9. Mobile sites using .mobi perform better on search engines. Each domain gets only one entry in the web “zone files” that search engines use for their crawls. Your .com or .net is already used for your PC site, so you won’t get an entry for “m.site.com” or “site.net/mobile,” etc. … but you get one for .mobi.

10. Microsoft predicts most people’s first computing experience will be on a mobile. If your brand is one that people see during that formative experience, you will leave a positive, long-term impression.

Find out more at http://dotmobi.mobi or read http://blog.mobi.

Great tutorials for building your mobile site

Why do we have to care with mobile site?

Simple, because there are billion people who have access to mobile phone. So? What’re you waiting for? Go ahead and check if your website is mobile ready. You can go to ready.mobi

If you don’t want to build everything from zero and just need an instant mobile version of your site, you can check out this tutorial How to Create a Mobile Site with MoFuse.

For blogger with wordpress, you can install mobile plugin for your wordpress. Check this out WordPress Mobile Plugin.

And if you prefer to build mobile site from scratch, maybe this will help you to get started.

  1. A Simple Mobile Site with CodeIgniter
  2. Build a Mobile and Desktop-Friendly Application in Django in 15 Minutes
  3. dotMobi Mobile Web Developer’s Guide
  4. A Beginner’s Guide to Mobile Web Development
  5. XHTML Mobile Website Templates
  6. Character Encoding Issues and the Mobile Web
  7. Best and Worst Of The Mobile Web
  8. Effective Design for Multiple Screen Sizes
  9. A Very Modern Mobile Switching Algorithm – Part I
  10. A Very Modern Mobile Switching Algorithm – Part II
  11. Mobile App Design: Getting to the Point – Part I
  12. Mobile App Design: Getting to the Point – Part II
  13. Mobile Web Design – Working with Color
  14. 240×320, the new standard screen resolution
  15. Mobile Web Design – Beyond Simple XHTML Pages I
  16. Mobile Web Design – Beyond Simple XHTML Pages II
  17. Mobile Web Design – Beyond Simple XHTML Pages III
  18. Creating Mobile Web Sites with Google App Engine
  19. Content Delivery for Mobile Devices
  20. Tips to design your site for mobile devices
  21. Lightweight device-detection in PHP
  22. Make your Site Mobile Friendly
  23. Designing for the Mobile Web
  24. Making Small Devices Look Great
  25. 7 usability guidelines for websites on mobile devices
  26. Coding for the mobile web
  27. Designing and Developing mobile web sites in the real world, part 1
  28. Designing and Developing mobile web sites in the real world, part 2
  29. Mobile Web Design ~ The Series

How To Make Your Site Mobile Friendly ???

apple-iphone-keyboard Unless you’ve been living under a rock, you would have heard about the phenomenal sales of the new iPhone by Apple. It sold approximately 1 million handsets in 3 days – which is approximately 231 handsets per second.

Now stop and think what that means for website marketing. There’s no prizes for realizing that a mobile version of your website is now becoming more important than ever.

I understand it might still be hard for you to justify the expense of getting a professional mobile version of your website designed, but here’s 4 FREE ways to get a mobile version up.

1. Mofuse:

If your website produces an RSS feed, then Mofuse could be the answer. It takes your sites RSS feed and turns it into a mobile friendly website – perfect for viewing on a myriad of handsets.

2. Mippin

Mippin is another free tool that allows you to turn your website’s RSS feed into your new mobile site. While it’s a simple tool to use, it lacks a lot of the customization that mofuse offers.

3. Wirenode

Don’t have an RSS feed, then Wirenode might be a better option. While it offers some handy templates to get you started, there isn’t much in the way of customization. It does however offer some basic analytics to track performance.

4. Google Mobile Optimizer

The quickest, easiest but possibly ugliest way to mobilize your site is thanks to Google. Just submit your URL and voila – you have a mobile friendly site. But forget about customization – it’s not for those with fancy mobile website aspirations. But heck – it works!

So if you want to ensure you have a mobile friendly version of your website for all your new iPhone carrying customers, without the hefty redesign costs, you’ve got 5 easy ways to get started.

If you try out the tools, make sure to link to your new mobile website via our comments section below so we call all take a look.

By Rene LeMerle

%d bloggers like this: