2014年8月3日星期日

Community News: Packagist Latest Releases for 08.03.2014

Recent releases from the Packagist:

2014年8月2日星期六

Community News: Packagist Latest Releases for 08.02.2014

Recent releases from the Packagist:

2014年8月1日星期五

Site News: Popular Posts for the Week of 08.01.2014

Popular posts from PHPDeveloper.org for the past week:

Community News: Packagist Latest Releases for 08.01.2014

Recent releases from the Packagist:

NetTuts.com: Understanding and Working with Relationships Between Data in WordPress


NetTuts.com has posted the second part of their series looking at the "guts" of a typical WordPress installation. In the first part they gave an overview of the structure and contents of the various database tables. In this second part they get more into the relationships between them.



In the first part of this series on data in WordPress, I gave an overview of the WordPress database tables, and which tables are used to store what kind of data. In this second part, I'll outline how WordPress manages the relationships between that data. As you'll see, WordPress uses three kinds of data relationship - one-to-one, one-to-many and many-to-many. I'll look at each of these and what they mean for your WordPress site.


He goes through each of the relationship types and includes examples from the WordPress database to illustrate them. He then gets into a bit more depth, talking about the specifics of some relationships like: posts-to-users, posts-to-comments, comment-to-comment and the structure of the many-to-many relationships too.


Link: http://code.tutsplus.com/tutorials/understanding-and-working-with-relationships-between-data-in-wordpress--cms-20632

PHP.net: PHP 5.6.0RC3 is available


The PHP development team has officially released the next Release Candidate in the PHP 5.6.x series today - PHP 5.6.0RC3. Reminder, this is not a production (stable) release so do not use it in live applications.



The PHP development team announces the immediate availability of the third release candidate of PHP 5.6. As we entered the feature freeze with beta1, this is a bugfix-only release. All users of PHP are encouraged to test this version carefully, and report any bugs in the bug tracking system.


You can download it from the usual QA-related places: qa.php.net for the source and windows.php.net for the Windows binaries. The release timeline is expecting the next Candidate to be posted on August 14th.


Link: http://php.net/index.php#id2014-07-31-1

SitePoint PHP Blog: Diffbot: Crawling with Visual Machine Learning


On the SitePoint PHP blog Bruno Skvorc has posted a tutorial showing you how to use the Diffbot service to extract data from any page. He introduces both the service itself and walks you through a simple request via Guzzle.



Have you ever wondered how social networks do URL previews so well when you share links? How do they know which images to grab, whom to cite as an author, or which tags to attach to the preview? Is it all crawling with complex regexes over source code? Actually, more often than not, it isn't. [...] If you want to build a URL preview snippet or a news aggregator, there are many automatic crawlers available online, both proprietary and open source, but you seldom find something as niche as visual machine learning. This is exactly what Diffbot is - a "visual learning robot" which renders a URL you request in full and then visually extracts data, helping itself with some metadata from the page source as needed.


He uses a combination of a Laravel installation (via a Homestead instance) and a Guzzle request using a fetched token. The service offers a 10k call limit on a 7 day free trial, so you can sign up and grab your token there. He includes code for an example request fetching a SitePoint page and parsing out the tags. He also briefly looks at the custom handling diffbot allows based on CSS-type rules.


Link: http://www.sitepoint.com/diffbot-crawling-visual-machine-learning/