Raspberry Pi Part
2. Create the ios.php file with this command:
sudo nano /var/www/ios.php
4. Edit and save the file as below:
<?php
if (isset($_GET[language]) and isset($_GET[product])) {
print "GET:";
print "\nYour language: " . $_GET[language];
print "\nYour product: " . $_GET[product];
} else if (isset($_POST['name']) and isset($_POST['age'])) {
print "Post:";
print "\nYour name: " . $_POST['name'];
print "\nYour age: " . $_POST['age'];
} else {
print "Wrong request";
}
?>
In this example, parameters used in the GET method are language and product, while parameters used in the POST method are name and age.
5. Test the GET method with the browser:
Invalid HTTP GET:
http://192.168.0.149/ios.php
Valid HTTP GET:
http://192.168.0.149/ios.php?language=objective-c&product=applewatch
iOS Part
1. Write a simple iOS app. See this:
2. Test the app. The results:
GET:
POST:
PHP Manual
Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.
ReplyDeleteerp and salesforce development hyderabad
erp Development Company in Hyderabad
best salesforce website developer in hyderabad
erp services provider in hyderabad
ReplyDeleteNice blog..! I really loved reading through this article... Thanks for sharing such an amazing post with us and keep blogging...
Pimples Treatment in Hyderabad
best Pimples Treatment in Madinaguda
Pimples Treatment in Gachibowli
Pimples Treatment in Banjarahills