Created
October 16, 2017 05:43
-
-
Save IshamMohamed/476254c3625117c87cab1bee7511c391 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') { | |
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Methods: POST, GET, DELETE, PUT, PATCH, OPTIONS'); | |
header('Access-Control-Allow-Headers: token, Content-Type'); | |
header('Access-Control-Max-Age: 1728000'); | |
header('Content-Length: 0'); | |
header('Content-Type: text/plain'); | |
die(); | |
} | |
header('Access-Control-Allow-Origin: *'); | |
header('Content-Type: application/json'); | |
$person1 = [ | |
'Name' => 'Alfreds Futterkiste', | |
'City' => 'Berlin', | |
'Country' => 'Germany', | |
]; | |
$person2 = [ | |
'Name' => 'Ana Trujillo Emparedados y helados', | |
'City' => 'México D.F.', | |
'Country' => '"Mexico"', | |
]; | |
$person3 = [ | |
'Name' => 'Alfreds Futterkiste', | |
'City' => 'Berlin', | |
'Country' => 'Germany', | |
]; | |
$person4 = | |
[ | |
'Name'=>'Around the Horn', | |
'City'=>'London', | |
'Country'=>'UK' | |
]; | |
$person5 = | |
[ | |
'Name'=>'B s Beverages', | |
'City'=>'London', | |
'Country'=>'UK' | |
]; | |
$person6 = | |
[ | |
'Name'=>'Berglunds snabbköp', | |
'City'=>'Luleå', | |
'Country'=>'Sweden' | |
]; | |
$person7 = | |
[ | |
'Name'=>'Blauer See Delikatessen', | |
'City'=>'Mannheim', | |
'Country'=>'Germany' | |
]; | |
$person8 = | |
[ | |
'Name'=>'Blondel père et fils', | |
'City'=>'Strasbourg', | |
'Country'=>'France' | |
]; | |
$person9 = | |
[ | |
'Name'=>'Bólido Comidas preparadas', | |
'City'=>'Madrid', | |
'Country'=>'Spain' | |
]; | |
$person10 = | |
[ | |
'Name'=>'Bon app', | |
'City'=>'Marseille', | |
'Country'=>'France' | |
]; | |
$person11 = | |
[ | |
'Name'=>'Bottom-Dollar Marketse', | |
'City'=>'Tsawassen', | |
'Country'=>'Canada' | |
]; | |
$person12 = | |
[ | |
'Name'=>'Cactus Comidas para llevar', | |
'City'=>'Buenos Aires', | |
'Country'=>'Argentina' | |
]; | |
$person13 = | |
[ | |
'Name'=>'Centro comercial Moctezuma', | |
'City'=>'México D.F.', | |
'Country'=>'Mexico' | |
]; | |
$person14 = | |
[ | |
'Name'=>'Chop-suey Chinese', | |
'City'=>'Bern', | |
'Country'=>'Switzerland' | |
]; | |
$person15 = | |
[ | |
'Name'=>'Comércio Mineiro', | |
'City'=>'São Paulo', | |
'Country'=>'Brazil' | |
]; | |
$ret = [ | |
'records' => array($person1,$person2, $person3, $person4, $person5, $person6, $person7, $person8, $person9, $person10, $person11, $person12, $person13, $person14, $person15) | |
]; | |
print json_encode($ret); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment