Friday, August 3, 2012

PHP Master | Access Dropbox Using PHP

Over at they have a great article on how to take advantage of the Dropbox using a third part PHP SDK.

In this article we’ll explore the Dropbox API by building a simple client for accessing files in a Dropbox account. The client will perform some basic operations, such as authentication, listing files, and uploading and downloading files.

To keep the article short and readable, I’ll keep the included code to a minimum and instead refer you to the full code available on PHPMaster’s GitHub. To run the code, you’ll need PHP with cURL support and obviously a Dropbox account.

Your starting point for anything related to development with Dropbox should be the Dropbox Developers Center where you can find the API reference along with its basic concepts and best practices. You can also download the official SDKs, but PHP isn’t listed among the supported languages. There’s a link to a third party PHP SDK on Github.

via PHP Master | Access Dropbox Using PHP.

PHP Tutorials Playlist on YouTube

Came across probably one of the longest and most complete st of video tutorials for learning PHP that I have ever seen. From you basic introduction to Classes, Constants, and extends.

If you have ever been interested in learning PHP I suggest check out PHP Tutorials Playlist by thenewboston on YouTube

PHP Tutorials Playlist – YouTube.

Thursday, August 2, 2012

PHP Shorthand If/Else Using Ternary Operators (?:)

I always forget this trick when I need it. A great shortcut to keep on hand for those quick if/else needs.

An essential part of programming is evaluating conditions using if/else and switch/case statements. If / Else statements are easy to code and global to all languages. If / Else statements are great but they can be too long.

I preach a lot about using shorthand CSS and using MooTools to make JavaScript relatively shorthand, so I look towards PHP to do the same. If/Else statements aren’t optimal (or necessary) in all situations. Enter ternary operators.

Ternary operator logic is the process of using “(condition) ? (true return value) : (false return value)” statements to shorten your if/else structures.

via PHP Shorthand If/Else Using Ternary Operators (?:).