You searched for php tutorials

  1. 8 Must Have PHP Quality Assurance Tools

    Quality Assurance in PHP is a valuable but very rarely seen aspect. In a world focused on rapid deployment and a “ship now, worry later” mentality, a focus on quality is a rare sight, especially when dealing with the web. One of our authors recently directed my attention to Sebastian Bergmann’s
  2. HHVM vs Zend Engine in PHP 6

    The fabled PHP 6 is long overdue. This unicorn of the web dev world has been “coming” for decades now, and it’s still not clear whether or not it’s actually something that’s going to happen in this decade, or just an idea, a fantasy of the PHP userbase. Minor versions like 5.4 > 5.5 and 5.5
  3. Social Network Authentication: Google+

    application to work, our constructor will receive these 3 variables as parameters and set the properties. Until now, our code looks like this. <?php namespace SitePoint\SocialLogin\Google; use SitePoint\SocialLogin\Interfaces\SocialLoginInterface; class GoogleLogin implements
  4. Social Network Authentication: Merging Accounts

    In this part, we will have a look at how we can make sure people don’t have multiple accounts after signing into our application through different means.

    Merging accounts

    If you allow users to sign up through different social networks and perhaps your own registration system, there is a good chance some users will have multiple accounts. How annoying can it be for a user who signed up through Facebook earlier, to come back later and log in through Twitter because he thought he used that one?We can prevent this by letting the user merge manually or try to use an automatic system to try and identify duplicated users.

    Setup

    I suggest a setup of two database tables. The first table is the general user table, which contains all information about the user.

    CREATE TABLE IF NOT EXISTS `user` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `username` varchar(255) NOT NULL,
      `password` varchar(255) DEFAULT NULL,
      `firstname` varchar(50) NOT NULL,
      `lastname` varchar(50) NOT NULL,
      `emailaddress` varchar(50) NOT NULL,
      `city` varchar(50) NOT NULL,
      `birtdate` date NOT NULL,
      `gender` varchar(10) NOT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

    Note: As you can see, I used the fields that we also used in our SocialLoginInterface. You might need more or less fields depending on your application. You even could decide to split this table in a user and user_profile table if you wish.

    The second table contains all data regarding any third party logins the user used.

  5. Magento Basics, Request Flow, Standards and Best Practices

    primitive, but due to backwards compatibility could not be solved sooner - Magento 2 will use ZF2, modern PHP and namespaces. Request Flow Let’s see how a Magento application handles a request starting from the main index.php file. Application Initialization 1) If you use Nginx, you should
  6. Phalcon 2.0 Alpha Landing

    . First, check out this Vimeo screencast on making your first Zephir extension. Creating your first PHP extension with Zephir from Phalcon Framework on Vimeo. Next, follow through the tutorial, read the docs, and play around. If you end up making anything other than what the tutorials teach
  7. Web Performance Tricks - Beyond the Basics

    in this article won’t be strictly PHP related, but you can be sure they’ll bring your application to a whole new level if used properly. Note that we won’t be covering the usual stuff - fewer requests for CSS, JS and images meaning faster websites and similar hints are common knowledge. Instead, we’ll be focusing
  8. A Crash Course in Growth Hacking with Google+

    and an information snippet. If I Google “Sitepoint php”, look what happens: This is automatic. All you need to do is verify your page (instructions for doing that are on your page’s dashboard in Google+) and Google takes care of the rest. App Indexing (mobile) App Indexing is when you let
  9. Whip Up a Yahoo! Mashup Using PHP

    a decent knowledge of PHP 5 -- specifically, that you're comfortable with the basic syntax, classes and objects, and have some basic background on web services. Take a look at the Wikipedia article on web services and SitePoint's other PHP tutorials if you think you may have trouble