Posted on November 22, 2011 at 8:44pm
Sooner or later you are going to find yourself needing to fetch a visitors information. In particular, this article covers how to get the IP address of a visitor. Luckily, with PHP, this can be done very easily by utilizing the $_SERVER array. Check out the code below. This bit of code will output the … Continue reading →
Posted on October 17, 2011 at 4:03pm
Validating email addresses is crucial when you are trying to develop user registration systems, opt-in newsletters, and anything else imaginable where someone’s email address would be required. There are a few different methods of doing this with PHP, but I want to focus on the validate filters that come with PHP. So often people look over PHP functions … Continue reading →
Posted on October 15, 2011 at 7:01am
Using the PayPal IPN is imperative when it comes to processing payments with your own shopping carts, donation pages, etc. Having an effective and simple IPN script in your bag of tricks is important when you are trying to create a smooth and seemless integration between your website and PayPal. In this article, I’ll show … Continue reading →
Posted on October 14, 2011 at 5:59am
While using file_get_contents() is one of the simplest approaches to grabbing the contents of a webpage or a file and using it in a variable, there are several advantages to using CURL instead. The biggest and most widely-known advantage is how much faster CURL is. I am not going to list all of the advantages … Continue reading →
Posted on October 13, 2011 at 12:39pm
Using PHP shorthand conditional (if, else) statements is really useful if you need to add a conditional statement inside of an echo, a variable, etc. In the following example, I’ll show you a shorthand if statement and its non-shorthand equivalent. Now rather that sit and explain how this works, I’d rather just show you. Check … Continue reading →
Posted on October 13, 2011 at 4:33am
Looping through A-Z isn’t as complex or difficult as some people might think. As a matter of fact, its super easy. By now you’re most likely used to using for and foreach loops with arrays and integers, and accessing the alphabet with these kinds of loops is no different. First we will take a look … Continue reading →
Posted on October 13, 2011 at 3:09am
Stopping SQL injection in your scripts is very simple with PHP. PHP comes with a huge resource of ready-made functions for you to use. The function we are going to be focusing on in this article is mysql_real_escape_string(). What mysql_real_escape_string() does, is it automatically escapes all special characters which could be malicious to your site/database/server if … Continue reading →