Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Azure Functions

You're reading from   Learning Azure Functions Build scalable cloud systems with serverless architecture

Arrow left icon
Product type Paperback
Published in Sep 2017
Publisher Packt
ISBN-13 9781787122932
Length 240 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Mitesh Soni Mitesh Soni
Author Profile Icon Mitesh Soni
Mitesh Soni
Manisha Yadav Manisha Yadav
Author Profile Icon Manisha Yadav
Manisha Yadav
Arrow right icon
View More author details
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 $19.99/month. Cancel anytime
Banner background image