2013年8月31日星期六

Community News: Packagist Latest Releases for 08.31.2013

Recent releases from the Packagist:

2013年8月30日星期五

Site News: Popular Posts for the Week of 08.30.2013

Popular posts from PHPDeveloper.org for the past week:

Community News: Packagist Latest Releases for 08.30.2013

Recent releases from the Packagist:

DesignShack.com: How to Build a Dynamic Imgur Upload App Using jQuery & PHP


On DesignShack.com Jake Rocheleau has a tutorial showing you how to create an image uploader that pushes the image over to the Imgr service.



In this tutorial I want to demonstrate how we can remotely mirror an image found elsewhere online and auto-upload to Imgur. It's possible to create a form handling user-uploaded images as well. But I wanted to keep the demo clean without needing to move user content onto the server. This process is very simple once you understand how APIs work.


He provides all of the code and guidance you'll need to get the system working. It uses a simple HTML layout, some jQuery for submitting the image data back to the the server and a PHP script to call the Imgr API. It uses curl to make the call, so you'll need that extension installed to use the example. You can check out the live demo or just download the source to get started quickly.


Link: http://designshack.net/articles/javascript/how-to-build-a-dynamic-imgur-upload-app-using-jquery-php/

Nomad PHP: November 2013 - Ed Finkler, "More Code, More Problems"


The Nomad PHP (virtual) user group has announced their speaker for the November 2013 meeting - Ed Finkler talking about the problems that come with having "more code" in your applications.



In this talk I'll extend the concepts to other languages we work with in web development, establishing these core principles: Learn languages, not frameworks, build small things, less code is better than more, and create and use simple, readable code We'll cover how following these principles makes you a better developer, and makes the job of maintaining and verifying your code much easier.


The meeting is on November 14th and you'll have to sign up if you'd like to attend. There's a $10 USD cost for a ticket and you can purchase them right up until the event.


Link: http://nomadphp.com/2013/08/29/november-2013/

Phil Sturgeon: CurlFile and the Facebook SDK in PHP 5.5


Phil Sturgeon has a new post to his site today looking at a new feature that's included with PHP 5.5, Curlfile, and how he uses it with calls to the Facebook API (and a fix to make it cooperate).



One of the features implemented in PHP 5.5 was CurlFile, a nice addition to the Curl extension to allow you to specify specific arguments as a file for upload. In previous versions (pre-PHP 5.5) the syntax looked like this: [@/foo/bar.jpg]. A little digging around lead me to try this syntax: [new CURLFile('/foo/bar.jpg','image/jpeg')]. Sadly while Curl was happy with this, the Facebook PHP SDK (v3.2.2) was not. It turns out the SDK will turn ANY value you send it in that params array into a string.


To get around the issue, he worked up his own fix to the Facebook PHP SDK and submitted a patch to get it introduced into the tool. He also includes a reminder to filter incoming user data for things containing the "@" too to prevent unwanted file transfers.


Link: http://philsturgeon.co.uk/blog/2013/08/curlfile-and-the-facebook-sdk-in-php-55

VG Tech: Inheriting Configuration in Zend Framework 2 Applications


On the VG Tech blog they show how, instead of copy and pasting configuration settings all across their Zend Framework v2 application, they used inheritance to specify just the differences.



When working on Zend Framework 2 applications you might come across situations where you need to differentiate the application configuration for the different application environments, be it development, staging, testing and/or production. This can be cache TTL's, Memcached hosts, Redis hosts, debugging levels and more. Instead of copy/pasting the complete configuration across multiple "environment"-configuration files or having switches in the code. [...] We wanted to use inheritance so that for instance the staging environment would inherit the complete production environment, with the exception of some caching configuration which we want to override in the staging configuration.


They show how to set up the default configuration files for the application and models as well as how to pull in the environment-specific values and overwrite them in the "$config" set. He also links to another post showing how to cache all of this configuration (involving a lot of files) to help with performance.


Link: http://tech.vg.no/2013/08/29/inheriting-configuration-in-zend-framework-2-applications/

2013年8月29日星期四

Site News: Blast from the Past - One Year Ago in PHP

Here's what was popular in the PHP community one year ago today:

Community News: Packagist Latest Releases for 08.29.2013

Recent releases from the Packagist:

NetTuts.com: Xdebug - Professional PHP Debugging


On NetTuts.com there's a new article introducing Xdebug, a powerful tool that can help you with debugging your PHP applications. It works by investigating what's happening "on the inside" and reporting it back to your debugger.



Well, technically, Xdebug is an extension for PHP to make your life easier while debugging your code. [...] But just imagine for a moment, as your applications evolve, you might get into the habit of sprinkling your code all over with little echos, var_dumps and custom debuggers. [...] The next question is: how do you debug in production? [...] Now lastly, have you ever wished to be able to step through your code, line by line, watch expressions, and even step into a function call to see why it's producing the wrong return value? Well, you should definitely dig into the world of professional debugging with Xdebug, as it can solve all of the problems above.


They walk you through the setup of a complete (MAMP-based) environment on an OSX installation. You'll also need Xcode and the command line tools to be able to compile Xdebug. They recommend installing Homebrew to make installing the needed tools easier. They use Homebrew to install the PHP 5.4 version of Xdebug which then compiles and outputs a shared module you can put in your PHP extensions directory.



On the other side of things, the article also helps you set up your IDE, in this case PHPStorm but it would work for lots of others - to accept the debug messages from the server. He includes a sample script with some calls to the Xdebug-enabled debugging functions and what kind of responses (with screenshots) you should see in your IDE.


Link: http://net.tutsplus.com/tutorials/tools-and-tips/xdebug-professional-php-debugging/

Fortrabbit.com: Integrating Codeship with Fortrabbit


On the Fortrabbit blog today they show how to integrate their service with the Codeship.io service, helping make continuous deployment simpler.



We have got a lot of requests concerning continuous integration lately. That's why we've published a new general article in our docs on how to integrate CI in your fortrabbit workflow. Pieter from wercker also just published this great article on how to integrate fortrabbit with wercker. Here is another one from us on how you could something similar combining Codeship with fortrabbit.


They walk you through the full process with a freshly created Fortrabbit application so you can see how to get it set from the start. The article shows you how to set up Codeship with the repository provider and the callback for push notifications. You'll have to set up a ssh key for Codeship to be able to access the repository and a special script that happens on push to trigger the build. There's also a bit at the end about "going multistage" with a different deployment process for each branch.


Link: http://blog.fortrabbit.com/integrating-codeship-with-fortrabbit/

2013年8月28日星期三

Community News: Latest Releases from PHPClasses.org

  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html






  • Sit\Http

    Package:


    Summary:

    Send HTTP requests using the Curl extension

    Groups:


    Author:


    Description:

    This class can send HTTP requests using the Curl extension...



    Read more at http://www.phpclasses.org/package/8206-PHP-Send-HTTP-requests-using-the-Curl-extension.html