HTTP Get and HTTP Post in PHP
This project consists in producing 2 pages in php
First page is to handle an HTTP Get method passed from an external VXML application.
Second page is to handle an HTTP Post request passed from a third party website ([login to view URL])
## Deliverables
HTTP Get and HTTP Post in PHP
This project consists in producing 2 pages in php
First page is to handle an HTTP Get method passed from an external VXML application
Second page is to handle an HTTP Post passed from a third party website
Page 1: Page handling HTTP Get
The VXML application is passing the following:
submit next="[login to view URL]" mobile="myMobileNumber" request="myRequest" method = "get"/
where:
mobile is a mobile number in the form 3125666468 or +447123456789
request is a word such as 'Restaurants' or 'Theatre' or 'Flowers' or 'Computers'
you need to create the [login to view URL] page in order to do the following:
a) test IF mobile starts with a + sign, THEN remove the + sign (and keep the rest of the field unchanged) ELSE add a leading 1 to the number and keep the rest of the field unchanged
b) IF request = Restaurants THEN
[login to view URL]
ELSE IF request = Theatre THEN
[login to view URL]
ELSE IF request = Flowers THEN
[login to view URL]
ELSE
[login to view URL]
That's it for Page 1
Page 2: Page handling HTTP Post as follows:
This page is to handle HTTP Post as described on [login to view URL]
upon receiving a Post, the page should:
a) acknowledge as described in HTTP Response section of csoft link above
b) IF Message = List (any combination upper/lower case) or is empty THEN
Assign the content of an SMS to be sent back based on the ReplyTo number received in the Post
send the SMS message as per example provided at [login to view URL]
ELSE IF Message = SList (any combination upper/lower case) THEN
Assign the content of an SMS to be sent back based on the ReplyTo number received in the Post
send the SMS message as per example provided at [login to view URL]
ELSE IF Message = Restaurants (any combination upper/lower case and with/without s) THEN
[login to view URL]
ELSE IF Message = Theatre (any combination upper/lower case and with/without s) THEN
[login to view URL]
ELSE IF Message = Flowers (any combination upper/lower case and with/without s) THEN
[login to view URL]
ELSE IF Message = Computers (any combination upper/lower case and with/without s) THEN
[login to view URL]
ELSE IF Message = Beer (any combination upper/lower case) THEN
Assign the content of an SMS to be sent back based on the ReplyTo number received in the Post
send the SMS message as per example provided at [login to view URL]
ELSE IF Message = Pizza (any combination upper/lower case) THEN
Assign the content of an SMS to be sent back based on the ReplyTo number received in the Post
send the SMS message as per example provided at [login to view URL]
ELSE do nothing
That's it for this page.