News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Bitcoin and PHP with Coinbase's API - Demo App
October 09, 2014 @ 09:25:51

The SitePoint PHP blog has posted the second part of their series about using the CoinBase API through PHP. In this new tutorial they use the API connection made in the first part via the Coinbase SDK.

In part 1, we covered basic installation and usage of Coinbase's Bitcoin PHP API and the accompanying SDK. In this second and final part, we'll be building our sample application.

He briefly shows how to send and receive bitcoins before diving into the application. His simple application includes a basic welcome page, a payment page, thanks page and a cancel page (in case of errors). Complete code for the HTML, CSS, and PHP (API calls) is included in the post. He shows how to create the button to start the payment process and add it to the page.

0 comments voice your opinion now!
coinbase bitcoin series tutorial part2 demo application

Link: http://www.sitepoint.com/bitcoin-php-coinbases-api-demo-app/

Sameer Borate:
Creating Twitter Apps in PHP
September 29, 2014 @ 09:28:42

Sameer Borate has a post today showing how you can create a simple Twitter application in PHP making use of their REST API and the twitter-api-php library.

In this post we will look into accessing Twitter REST API in PHP. This can be useful if you need to post Tweets from your PHP application or anaylze, search Tweets. In the following examples we will use the twitter-api-php PHP wrapper for Twitter v1.1 API. Although there are a few wrappers around, this one I like for its simplicity.

He helps you get the library installed (via Composer) and create an application on the Twitter side at apps.twitter.com. Sample code is included showing how to connect to the API with your credentials, including handling the OAuth authorization piece. From there he shows two examples of action to make on the API: posting a new tweet and searching for new tweets based on a query string.

0 comments voice your opinion now!
twitter application tutorial introduction library oauth search post tweet

Link: http://www.codediesel.com/social/creating-twitter-apps-in-php/

NetTuts.com:
How to Build Rate Limiting into Your Web App Login
September 22, 2014 @ 11:12:14

In this new tutorial on NetTuts.com, Jeff Reifman shows you how to build rate limiting into your application to help with issues on your login caused by possible brute force attacks.

Since one of the wealthiest corporations in the world [Apple] didn't allocate the resources to rate limit all of their authentication points, it's likely that some of your web apps don't include rate limiting. In this tutorial, I'll walk through some of the basic concepts of rate limiting and a simple implementation for your PHP-based web application.

He starts with a brief look at how (brute force) login attacks actually work and how that relates to the most common passwords used. He splits out the two main approaches to rate limiting in applications: limit based on failures by username or limiting by IP address. He then gets into the actual code examples, choosing a Yii framework-based application for his illustration. He creates a simple "failed login" database table, shows how to log the attempts and includes a snippet to purge items older than (by default) 120 minutes ago. Finally, he includes the code to check the table and see if the username has too many failures listen and, if so, denies them access.

0 comments voice your opinion now!
rate limiting login application tutorial mysql database

Link: http://code.tutsplus.com/tutorials/how-to-build-rate-limiting-into-your-web-app-login--cms-22133

SitePoint PHP Blog:
Build a New App with Laravel and EmberJS in Vagrant
August 25, 2014 @ 11:31:58

The SitePoint PHP blog has kicked off another series of posts today with part one of a series looking at building an application based on the Laravel PHP framework and EmberJS.

Nowadays, everything is turning into a web application. Even simple websites have a mobile app relying on a REST Api. Web applications are accessible everywhere - on a laptop, desktop, tablet, mobile, and recently on wearable devices like smartwatches. Everything is becoming smaller and faster - front ends are becoming separated from back ends, and only communicate with the server through APIs. In this series, we are going to create a photo uploading app. For the front-end, we will use EmberJs and Foundation 5. [...] For the back-end, we will use Laravel. The source code will be available per-part, and in final shape in the final part of this series.

They go with the Laravel Homestead virtual machine (and Vagrant) to make for a quick setup and stable environment. They help you get it all set up to push up to Heroku and get all needed dependencies, both frontend and backend, installed. They also walk you through the setup of the database, configuring the connection and deploying the application to production.

0 comments voice your opinion now!
tutorial emberjs vagrant laravel homestead application series part1

Link: http://www.sitepoint.com/build-new-app-laravel-emberjs-vagrant/

SitePoint PHP Blog:
APIfy Your Legacy App with Toro
August 19, 2014 @ 12:09:39

The SitePoint PHP blog has a new post that wants to help you API-ify your legacy application with ToroPHP, a router that's "designed for minimalists" to make routing and handling RESTful requests easier.

For the Google Summer of Code 2014, I was selected for a project to create a REST API for ATutor. ATutor has hundreds of thousands of lines of code, yet is written in core PHP. Introducing a PHP router class for the API was necessary, but we needed something unintrusive.

The result was the ToroPHP library. He introduces the library with some background about why it was created and some of the goals it was trying to achieve. Next he shows you how to create a simple "Hello World" endpoint that just defines the endpoint and echoes back the string. He shows how to separate out the logic from the route handling via the "urls.php" definition file. He also shows the handling of URL prefixes and mentions user authentication, making a "backbone" for the API and reuse of classes for similar objects.

0 comments voice your opinion now!
tutorial legacy application torophp library api rest

Link: http://www.sitepoint.com/apify-legacy-app-toro/

AboutPerformance Blog:
How to Spruce up your Evolved PHP Application - Part 2
August 08, 2014 @ 10:57:51

On the About:Performance site today there's a new post (part two in the series, part one is here) about increasing the performance in your PHP application. In this new post he talks about a few other updates that can be made to make your app fly.

In the first part of my blog I covered the data side of the tuning process on my homegrown PHP application Spelix: database issues, caching on both the server and the client. [...] In this part, I will concentrate more on technical topics: network traffic, code caching and session handling.

The post shares helpful tips and code examples showing how to:

  • Reduce Network Traffic
  • Leverage Browser / CDN cache
  • Use Conditional and Non-Conditional Caching
  • Using the HTML5 Application Cache
  • Optimize Session Handling

He does suggest the use of a commercial tool for a more in-depth analysis, but there's nothing here that it's required for. A little poking around in your browser can yield most of the same results.

0 comments voice your opinion now!
application performance tips traffic cdn cache session optimize

Link: http://apmblog.compuware.com/2014/08/06/spruce-evolved-php-application-part-2/

Symfony Blog:
Push it to the limits - Symfony2 for High Performance needs
August 04, 2014 @ 13:51:48

On the Symfony blog today they've posted a use case that talks about Symfony meeting some high performance needs and some of the development that was done to make it happen.

For most people, using full-stack frameworks equals slowing down websites. At Octivi, we think that it depends on correctly choosing the right tools for specific projects. When we were asked to optimize a website for one of our clients, we analyzed their setup from the ground up. The result: migrate them toward Service Oriented Architecture and extract their core-business system as a separate service. In this Case Study, we'll reveal some architecture details of 1 Billion Symfony2 Application. We'll show you the project big-picture then focus on features we really like in Symfony2. Don't worry; we'll also talk about the things that we don't really use.

They start with some of the business requirements they needed to meet and how it influenced the overall architecture of the application. They cover some of the things they liked the most about using the framework including bundles and using the EventDispatcher component. Some example code is also included for the custom handling they created for routing, CLI commands and request handling. There's also a mention of using the Profiler, Stopwatch and Monolog trio to do some performance analysis on the resulting application. Finally, there's a brief mention of some of the tools they're not using and why (two of them): Doctrine and Twig.

0 comments voice your opinion now!
symfony usecase performance need application custom

Link: http://symfony.com/blog/push-it-to-the-limits-symfony2-for-high-performance-needs

PHPBuilder.com:
Creating Real Time Applications with PHP and WebSockets
July 29, 2014 @ 12:13:07

On PHPBuilder.com today there's a new tutorial introducing you to the combination of PHP and WebSockets to make real-time requests to fetch data in your application.

This article will explore the main PHP libraries used to create real time, bi-directional applications between clients and servers over WebSockets. WebSocket is full-duplex client/server communication over TCP. It is also a new feature available in browsers as a part of the HTML5 specs that allows JavaScript clients to open bi-directional socket connections to a server. [...] WebSocket connections are basically TCP socket connections that following the WebSocket rules to communicate. The WebSocket Protocol is an independent TCP-based protocol.

They introduce some of the basic concepts behind WebSockets (including an example URL) and show how to use the PHPWebSockets library to handle some sample requests. They also include some basic JavaScript to make the request to the backend PHP script and send or fetch content on the server. They also show you how to implement a simple chat server using a few other libraries like Ratchet, Elephpant.io and Socket.io.

0 comments voice your opinion now!
realtime application websockets tutorial introudction

Link: http://www.phpbuilder.com/articles/application-architecture/optimization/creating-real-time-applications-with-php-and-websockets.html

NetTuts.com:
Best Practices When Working With Sensitive Data Securing Your Application
July 21, 2014 @ 10:27:07

The NetTuts.com site has a new tutorial posted today sharing some tips about working with sensitive data in your applications and steps to secure it.

In my previous article, I showed you how to protect your server from attacks and malicious software. This part will focus completely on the third layer of security - your application itself. So here, I will show you techniques that you can use to protect your application from attacks and intrusions.

There's three main topics covered here, each with a few subpoints and some code examples:

  • Using a Database
  • Use a Salt When Hashing
  • POSIX: Drop Privileges When You Don't Need Them
0 comments voice your opinion now!
secure data application tutorial sensitive

Link: http://code.tutsplus.com/tutorials/best-practices-when-working-with-sensitive-data-securing-your-application--cms-21719

Qandidate.com Blog:
Fault tolerant programming in PHP
July 17, 2014 @ 10:44:04

The Qandidate.com blog has a new post today looking at fault tolerant programming in PHP applications. Essentially, this means writing your code so that error conditions are handled gracefully and with as little impact as possible.

In your application, every time you call an "external" service you are vulnerable to the failure in that service. That either might be a third party API being down, your database being unresponsive or unexpected errors from the 3rd party library you are using. With many developers and companies being interested in composing applications out of microservices at the moment, guarding for failures because of broken dependencies gets even more important.

They describe a situation where data is coming from an external source (an inventory service) and a timeout or connection failure occurs. They propose a sort of "circuit breaker" to be put in place to protect the application, fail fast on error and maybe even retry until the request is successful. They also point out a library from oDesk, Phystrix, that allows for fault tolerant execution through a wrapper that traps errors and deals with them instead of just breaking. This is the first part of a series, so in part two they'll show the library in use along with the React HTTP client.

0 comments voice your opinion now!
fault tolerant application phystrix library execution failure

Link: http://labs.qandidate.com/blog/2014/07/14/fault-tolerant-programming-in-php/


Community Events





Don't see your event here?
Let us know!


list update symfony language series package community laravel podcast zendserver introduction interview tips install opinion release library framework deployment api

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework