Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Azure Functions

You're reading from  Learning Azure Functions

Product type Book
Published in Sep 2017
Publisher Packt
ISBN-13 9781787122932
Pages 240 pages
Edition 1st Edition
Languages
Concepts
Toc

The PHP Function App


Let's create a PHP Function in Azure App. We already created Azure App in the previous chapter.

PHP is also still in the experimental phase, so we don't have much of an option as of now.

Example

Now we will create an Azure Function with the DNS lookup example in PHP:

  1. Log into Azure Portal and click on Azure Function App. We already created Azure Function App in the previous chapter, so now we will create the Azure Function.
  2. Click on the + sign and then select the coding language, as shown in the following screenshot:

By default, PHP gives the template that fetches the entities from a storage table when it receives the HTTP request.

The code for fetching a data from the storage table is already there in PHP. We can directly use it. However, in this example, we will not use the storage table. We will write code for DNS lookup.

This allows us to create only the HTTP GET request:

  1. Now, give a name to the function, provide the storage account connection, and click on the Create button...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime