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

SitePoint PHP Blog:
Picking the Brains of Your Customers with Microsoft’s Text Analytics
Oct 14, 2016 @ 12:19:21

In the latest tutorial posted to the SitePoint PHP blog author Wern Ancheta shows you how to integrate your application with the Microsoft Text Analytics API, a service offered by the company putting machine learning to work on things like keyword extraction, topic detection and language detection.

With the explosion of machine learning services in recent years, it has become easier than ever for developers to create “smart apps”. In this article, I’ll introduce you to Microsoft’s offering for providing machine-learning capabilities to apps. Specifically, you’ll learn about the Text Analytics API and build an app to enhance the understanding of online sellers when it comes to their customers.

The tutorial then introduces the Microsoft Cognitive Services API and, more specifically, the Text Analytics API that they'll be hooking the application in to. They walk you through getting an API key for the service, creating an "account" for the application you're working with and deploying it for immediate use. They introduce the functionality of the API with a few "play" examples of each API offered before getting into the creation of their sample application - a tool that reviews the contents of customer feedback, looking for key phrases and returns highlighted versions with what it sees as important.

tagged: customer tutorial text analytics microsoft machinelearning highlight feedback application slim3

Link: https://www.sitepoint.com/picking-the-brains-of-your-customers-with-microsofts-text-analytics/

Remi Collet:
Microsoft SQL Server from PHP
Sep 23, 2016 @ 11:57:34

In this recent post to his site Remi Collet shows you how to set up your PHP installation to allow it to work with a Microsoft SQL Server as it's data store.

Here is a small comparison of the various solutions to use a [Microsoft SQL Server](https://en.wikipedia.org/wiki/Microsoft_SQL_Server) database from PHP, on Linux. All the tests have be run on Fedora 23 but should work on RHEL or CentOS version 7.

Several different extensions were tested as a part of making the connection to the SQL server:

  • Using PDO, ODBC and FreeTDS
  • Using PDO, mssql and FreeTDS
  • Using PDO, ODBC and Microsoft® ODBC Driver
  • Using the Microsoft® Driver
  • Using PDO and the Microsoft® Driver

Each item comes with a list of the requirements involved (other modules/extensions), examples of the configuration changes you'll need to make and some sample code to create the connection.

tagged: tutorial microsoft sql sqlserver database connection example testing

Link: http://blog.remirepo.net/post/2016/09/20/Microsoft-SQL-Server-from-PHP

Announcing SQL Server on Linux
Mar 08, 2016 @ 10:20:24

It's not specific to the world of PHP but there was a major announcement from Microsoft yesterday about one of their products, SQL Server, and how they're officially brining it to Linux.

Today I’m excited to announce our plans to bring SQL Server to Linux as well. This will enable SQL Server to deliver a consistent data platform across Windows Server and Linux, as well as on-premises and cloud. We are bringing the core relational database capabilities to preview today, and are targeting availability in mid-2017.

[...] Bringing SQL Server to Linux is another way we are making our products and new innovations more accessible to a broader set of users and meeting them where they are.

Currently the release is in a private preview stage but more information on the release and how you can get it to install on your systems will be released in the coming months. You can sign up for updates and get more information about the product on the project website on Microsoft.com.

tagged: sqlserver linux release announcement microsoft

Link: https://blogs.microsoft.com/blog/2016/03/07/announcing-sql-server-on-linux/

SitePoint PHP Blog:
Building Microsoft’s What-Dog AI in under 100 Lines of Code
Feb 16, 2016 @ 12:38:28

On the SitePoint PHP blog there's a tutorial posted from editor Bruno Skvorc where he attempts to replicate the "What-Dog" application recently created by Microsoft in under 100 lines of code. It makes use of the Diffbot service to do the actual detection and evaluation.

Rather recently, Microsoft released an app using AI to detect a dog’s breed. [...] In my non-SitePoint time, I also work for Diffbot – the startup you may have heard of over the past few weeks – who also dabble in AI. To test how they compare, in this tutorial we’ll recreate Microsoft’s application using Diffbot’s technology to see if it does a better job at recognizing the adorable beasts we throw at it!

He walks you through the installation and configuration of the software you'll need (and account you'll need to create). From there he shares the code to take in the user's upload, send it as a POST request over to the Diffbot service and returning the relevant results. He finishes out the article with a comparison of the two services, posting various images and seeing which comes closer.

tagged: whatdog ai tutorial diffbot api dog compare microsoft

Link: http://www.sitepoint.com/building-microsofts-what-dog-ai-in-under-100-lines-of-code/

Zend Developer Zone:
Introspecting your Code with Z-Ray for Azure
Jan 13, 2016 @ 12:38:38

On the Zend Developer Zone blog Daniel Berman has posted a guide showing how to use their Z-Ray plugin to inspect code running on Azure for statistics around performance, queries and errors thrown by the code.

Quick experimentation, easy collaboration, automated infrastructure and scalability, together with advanced diagnostic and analytical tools – all provide PHP developers with good reasons to develop in the cloud.

[...] The combination of Z-Ray and the Azure cloud means PHP developers building apps on the Azure web app service get the best of both worlds – Z-Ray’s powerful introspection capabilities and Azure’s rich cloud infrastructure.

The post walks you through the steps to create a new Azure-based web application, how to upload your code and enable the Z-Ray feature directly from the Azure "Tools" menu. The Z-Ray toolbar is then automatically injected into your application for your immediate profiling needs.

tagged: azure microsoft hosting zray profiling tool interface tutorial

Link: http://devzone.zend.com/7093/introspecting-code-with-z-ray-for-azure/

SitePoint PHP Blog:
Debugging WordPress on Azure with Z-Ray
Oct 13, 2015 @ 11:23:55

On the SitePoint PHP blog there's a tutorial showing you how to integrate the Z-Ray tool into WordPress to make debugging it on an Azure instance simpler. The steps make major use of the Azure control panel handling, so it's not quite as useful as a cross-platform guide but at least it gives you an idea of what you could expect from the Z-Ray+WordPress integration.

We all know that WordPress is an amazingly rich, extendable and simple platform. That’s probably one of the reasons it powers so much of the web today. But in some cases this richness can be the downfall of your site. [...] This means you need an easy, safe and reliable way to profile your WordPress app that will help you identify the bottlenecks slowing it down.

This article demonstrates a simple way to do just this. It describes how to debug a WordPress application deployed on Microsoft Azure’s web app service, using Z-Ray for Azure – a new technology that was announced a few months ago and is now in preview mode.

He walks you through the entire process (assuming you already have an account on Azure:

  • Creating the sample WordPress application on Azure
  • Enabling Z-Ray
  • Developing WordPress with Z-Ray

In that last step he includes some screenshots of the kinds of results you can expect from the plugin including details about cache objects, plugin statistics, hooks being executed and WP Query use. He ends the post looking at using Z-Ray for mobile debugging and how to use it in "secured mode" in a production environment.

tagged: tutorial wordpress azure microsoft zray debugging installation configuration

Link: http://www.sitepoint.com/debugging-wordpress-on-azure-with-z-ray/

Microsoft Channel 9:
A Peek of the PHP Ecosystem Today
Apr 06, 2015 @ 10:43:19

In this recent video on the Microsoft Channel9 video series, host Cory Fowler shares a presentation from Pierre Joye with a "peek of the PHP ecosystem today".

This week Cory is joined by Pierre Joye, from the Open Source Technology Center at Microsoft, to talk about the current state of the PHP Ecosystem. There are many different projects in PHP which are making news, Pierre explains what they are and how they are changing the shape of the PHP Ecosystem.

You can watch the episode through the in-page video player or you have numerous options for downloading just the audio as high/low quality as mp3 or mp4.

tagged: video microsoft channel9 ecysystem pierrejoye coryfowler

Link: http://channel9.msdn.com/Shows/Web+Camps+TV/A-Peek-of-the-PHP-Ecosystem-Today

SitePoint PHP Blog:
Generate Excel Files and Charts with PHPExcel
Sep 11, 2014 @ 09:48:55

SitePoint's PHP blog has a new post that walks you through the creation of Excel files with the help of the PHPExcel tool, a part of the overall PHPOffice package.

After my article “How To Make Microsoft Word Documents with PHP” (using Interop capability under Windows), there were quite a few comments urging a pure PHP implementation, i.e., only using a universal PHP library to manipulate Office files. In this article, we will see how to use a PHPExcel library to provide an “Export to Excel” function in a web app so that the user can export the data into an Excel 2007/2013 file for further analysis.

His example spreadsheet shows game information for an NBA team (the LA Lakers) including some charting and analytic data in the exported output. He sets up a simple Silex application and both a base and export endpoints. He also shows you how to create the PHPExcel instance, configure it with properties like creator, title and a set of keywords. With this object in place he moves into setting data for each of the rows/cells, populating it from a database table. He also includes examples of creating more than one sheet of results, inserting formulas and creating the charts mentioned earlier.

tagged: phpexcel tutorial excel microsoft chart formular export

Link: http://www.sitepoint.com/generate-excel-files-charts-phpexcel/

SitePoint PHP Blog:
Translation and Text-to-Speech with Microsoft Translator
Dec 05, 2013 @ 09:19:29

On the SitePoint PHP blog today there's a new tutorial showing you how to combine the Microsoft Azure platform services with their Translator API to create a text-to-speech translation service with some simple curl calls.

Text to speech is a popular technique used by many websites to provide their content in an interactive way. The generation of artificial human voice is known as Speech Synthesis. Even though it's highly popular, there are very few speech synthesis services, especially when looking for those free of charge. Microsoft Translator is one of the services we can use to get a speech service with limited features. In this tutorial, we are going to look at how we can use Microsoft Translator API to translate content and then make audio files using said content.

He walks you through setting up an Azure application (you'll need an account for the marketplace already) and how to subscribe to the translation service. It's a paid service but there's a "try before you buy" level that allows 2,000,000 characters of translation before it's cut off - perfect for testing. He includes the PHP to make the requests to the Translation API via curl. Included is code to initialize the configuration for the request, get the correct tokens and a reusable method for making the actual translation request. Finally, an example of doing the actual text-to-speech conversion is shown, resulting in an mp3 file.

He also includes an example of a simple frontend UI. You can see a working demo of the script here.

tagged: microsoft translator api texttospeech text speech tutorial azure service

Link: http://www.sitepoint.com/translation-text-speech-microsoft-translator/

Best in Class Libraries to Generate Excel Reports
Aug 14, 2013 @ 09:18:55

WebDeveloperJuice.com has posted a list of several PHP tools that you can use to create Microsfot Excel reports from your data (some a bit more feature-packed than others).

Every time somebody does something unique with PHP that is far beyond the standards and norms of PHP applications. One must say you will truly be overwhelmed by the capabilities and features of PHP language. Microsoft Excel is widely used by most of the companies as a report generation tool and data analysis tool. [...] In this post we will have a look at the various Libraries that the PHP developers can use for generating Excel Reports in any PHP Application and for exporting the data to Microsoft Excel Spreadsheets.

The tools that made their list are:

  • PHP Export Data
  • PHP Excel Library
  • Excel Writer (XML) PHP Library
  • Php-Excel
  • Pear Excel Writer Library
tagged: microsoft excel report generate library project

Link: http://www.webdeveloperjuice.com/2013/07/05/best-in-class-libraries-to-generate-excel-reports-in-php-applications/