 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
9Lessons.info: Login with Instagram OAuth using PHP
by Chris Cornutt May 23, 2012 @ 08:46:46
On the 9Lessons blog there's a recent tutorial showing you how to log into Instagram via OAuth with the help of their Instagram class.
The very quick registration gives you many users to your web project, we already published login with Facebook, Twitter and Google Plus now time to think about very popular photo sharing portal Instagram. This post explains you how to login with instagram Oauth API and importing user data. Create an instagram account and take a quick look at this demo thanks!
The tutorial walks you through the process of setting up an application in the Instagram service, configuring the scripts with the API key/secret and callback as well as the code for a simple login page. They've also included code to grab the user's information and "popular media" from the web service and pull that information into a local MySQL database.
voice your opinion now!
instagram oauth class tutorial popular media mysql
Artur Ejsmont's Blog: Publishing queue messages from PHP using different backends
by Chris Cornutt March 26, 2012 @ 11:31:53
Artur Ejsmont has a new post sharing some benchmarks he put together about the "messages per second" and "time to execute" when using PHP to pull from various messaging backends.
I have looked at the state of different messaging backends recently and i ran a little benchmark to see what is the rough comparison of message publishing throughput. Results that i got are quite surprising. What i wanted to achieve is some sort of reassurance before choosing a messaging bus for my PHP project.
Running both the PHP and the messaging test scripts on the same server, he pulled from a few different backend systems - RabbitMQ, MySQL, MongoDb, Memcached and ActiveMQ. The results were interesting, showing an interesting result in the time it took to execute versus the number of messages per second pushed in.
voice your opinion now!
benchmark message queue backend rabbitmq mysql mongodb memcached activemq
Thilanka Kaushalya's Blog: How to use Mysql Transactions with PHP
by Chris Cornutt March 20, 2012 @ 13:04:37
In this recent post to his blog Thilanka Kaushalya shows how to use transactions in MySQL databases (using mysqli
Web applications are more popular today than ever with the increasing number of internet users. Most of the standard alone applications converted as web based applications or at least they try to provide a web interface for users. PHP and Mysql are two leading technologies which allow uses on rapid development of web based systems. "Transaction" is a powerful concept which comes with Mysql 4.0 and above versions. Lets explore that.
He introduces the concept of transactions first, providing an example of a bank transfer between two individuals. He uses this to create a simple code sample that turns off the autocommit for the connection (using mysqli_autocommit set to false) and running the SQL in order before the commit. He also includes an example of using the rollback function to return the data back to its original state if there's an error.
voice your opinion now!
mysql transactions mysqli tutorial rollback
Jeremy Cook's Blog: Making PHPUnit, Doctrine & MySQL Play Nicely
by Chris Cornutt March 02, 2012 @ 12:05:48
Jeremy Cook has put together a new post showing how he got PUPUnit, Doctrine and MySQL to "play nicely" together when he was writing up some of his tests in a current application.
One of the pain points for me though has been in getting Doctrine setup with PHPUnit for testing. One of the main Doctrine contributors, Benjamin Beberlei, has written a package called DoctrineExtensions which amongst other things adds a class called DoctrineExtensionsPHPUnitOrmTestCase which extends PHPUnit's DbUnit database test case class. This all works well in principle but hits a major snag in reality: MySQL doesn't allow InnoDb tables with foreign keys to be truncated. PHUnit's database extension truncates the database tables before each test run and inserts a fresh set of data to work with.
To work around this issue Jeremy by porting over a method posted by Mike Lively over to Doctrine as a custom "MySQLTruncate" class (code included in the post). He also includes some sample code showing it in use - a basic ORM test case that calls the truncate method when its set up.
voice your opinion now!
phpunit doctrine orm unittest mysql truncate
PHPMaster.com: Working with Dates and Times in PHP and MySQL
by Chris Cornutt March 01, 2012 @ 08:51:47
On PHPMaster.com today there's a new tutorial by Sean Hudgston about working with dates and times via the PHP date functions and how they cooperate with dates/times from a MySQL database.
When working in any programming language, dealing with dates and time is often a trivial and simple task. That is, until time zones have to be supported. Fortunately, PHP has one of the most potent set of date/time tools that help you deal with all sorts of time-related issues: Unix timestamps, formatting dates for human consumption, displaying times with time zones, the difference between now and the second Tuesday of next month, etc. In this article I'll introduce you to the basics of PHP's time functions (time(), mktime(), and date()) and their object-oriented counterparts, and then take a look at MySQL dates and show you how to make them play nicely with PHP.
His examples include how to get the current Unix time, formatting dates/times, making timestamps and working with the more powerful DateTime objects. On the MySQL front, he shows the result of a normal date select, one using the "unix_timestamp" function and how to shift the result based on the user's timezone.
voice your opinion now!
date time mysql datetime tutorial format unix timestamp
Joshua Thijssen's Blog: Setting up a development environment
by Chris Cornutt February 06, 2012 @ 09:27:41
In a new post to his blog Joshua Thijssen gives a guide to how he usually sets up his development environments when working in PHP. It includes working with virtual machines, configuring DNS and setting up his tools to work with it all.
Doing development on multiple projects can be a burden from time to time. One project would be running on PHP 5.3, while another still needs 5.1. Sometimes you need a MySQL server, while on other occasions, you need a NoSQL solution like couchDB or MongoDB together with all kind of gearman functionality. This article shows you how I've setup such a development platform that allows you to quickly create new projects, and still maintain flexibility when you need it.
He uses VirtualBox with either a Debian or CentOS installation as a base platform. He uses Vagrant to set up and configure the machines to make setup almost automatic. He still has to go in and configure a few things like the VirtualHost and DNS settings for the site/application he's working on.
Next up is setting up the tools he uses, specifically XDebug and setting up his editor of choice (PHPStorm) for remote debugging.
voice your opinion now!
development environment virtualbox debian centos mysql vagrant xdebug phpstorm dns virtualhost
|
Community Events
Don't see your event here? Let us know!
|