I need help formatting JSON data in PHP
2465
$$
- Posted:
- Proposals: 23
- Remote
- #1636886
- Archived
Expert in php yii cakephp codeigniter laravel html5 scraping website node.js, reactjs python aws cloud machine learning data Analyst css3 javascript perl Api mysql json angular moodle wordpress
Little Elm
PHP/Wordpress/Python/React/Flutter - Web Development,Mobile Development,Data Science
Bay Minette
I am a web developer, now a days Looking for next challenging position and free for your work.
Lahore
Certified Laravel Developer | PHP | VueJS | Wordpress | API | Logo | Responsive Design | Shopify
Karachi
AWS PHP MySQL JavaScript jQuery Web Developer Programmer Also Linux systems administrator
Bala
108236966486962486651205802792608362309911011908269253674546927
Description
Experience Level: Intermediate
General information for the website: Package Tracking
Description of requirements/features: I have the following PHP code:
$url = 'https://api.website.com/tracks/usps/9205590164917312751089'; // path to your JSON file
$data = file_get_contents($url); // put the contents of the file into a variable
echo $data;
I need someone to help me take the raw JSON data and format it into a nice table using PHP. Similar to how it would look if you tracked a package on USPS.com. Here is an example of the JSON that is returned:
{
"carrier": "usps",
"tracking_number": "9205590164917312751089",
"address_from": {
"city": "Las Vegas",
"state": "NV",
"zip": "89101",
"country": "US"
},
"address_to": {
"city": "Spotsylvania",
"state": "VA",
"zip": "22551",
"country": "US"
},
"eta": "2016-07-23T00:00:00Z",
"servicelevel": {
"token": "usps_priority",
"name": "Priority Mail"
},
"metadata": null,
"tracking_status": {
"object_created": "2016-07-23T20:35:26.129Z",
"object_updated": "2016-07-23T20:35:26.129Z",
"object_id": "ce48ff3d52a34e91b77aa98370182624",
"status": "DELIVERED",
"status_details": "Your shipment has been delivered at the destination mailbox.",
"status_date": "2016-07-23T13:03:00Z",
"location": {
"city": "Spotsylvania",
"state": "VA",
"zip": "22551",
"country": "US"
}
},
"tracking_history": [
{
"object_created": "2016-07-22T14:36:50.943Z",
"object_id": "265c7a7c23354da5b87b2bf52656c625",
"status": "TRANSIT",
"status_details": "Your shipment has been accepted.",
"status_date": "2016-07-21T15:33:00Z",
"location": {
"city": "Las Vegas",
"state": "NV",
"zip": "89101",
"country": "US"
}
},
...
{
"object_created": "2016-07-23T20:35:26.129Z",
"object_id": "aab1d7c0559d43ccbba4ff8603089e56",
"status": "DELIVERED",
"status_details": "Your shipment has been delivered at the destination mailbox.",
"status_date": "2016-07-23T13:03:00Z",
"location": {
"city": "Spotsylvania",
"state": "VA",
"zip": "22551",
"country": "US"
}
}
]
}
Extra notes:
Description of requirements/features: I have the following PHP code:
$url = 'https://api.website.com/tracks/usps/9205590164917312751089'; // path to your JSON file
$data = file_get_contents($url); // put the contents of the file into a variable
echo $data;
I need someone to help me take the raw JSON data and format it into a nice table using PHP. Similar to how it would look if you tracked a package on USPS.com. Here is an example of the JSON that is returned:
{
"carrier": "usps",
"tracking_number": "9205590164917312751089",
"address_from": {
"city": "Las Vegas",
"state": "NV",
"zip": "89101",
"country": "US"
},
"address_to": {
"city": "Spotsylvania",
"state": "VA",
"zip": "22551",
"country": "US"
},
"eta": "2016-07-23T00:00:00Z",
"servicelevel": {
"token": "usps_priority",
"name": "Priority Mail"
},
"metadata": null,
"tracking_status": {
"object_created": "2016-07-23T20:35:26.129Z",
"object_updated": "2016-07-23T20:35:26.129Z",
"object_id": "ce48ff3d52a34e91b77aa98370182624",
"status": "DELIVERED",
"status_details": "Your shipment has been delivered at the destination mailbox.",
"status_date": "2016-07-23T13:03:00Z",
"location": {
"city": "Spotsylvania",
"state": "VA",
"zip": "22551",
"country": "US"
}
},
"tracking_history": [
{
"object_created": "2016-07-22T14:36:50.943Z",
"object_id": "265c7a7c23354da5b87b2bf52656c625",
"status": "TRANSIT",
"status_details": "Your shipment has been accepted.",
"status_date": "2016-07-21T15:33:00Z",
"location": {
"city": "Las Vegas",
"state": "NV",
"zip": "89101",
"country": "US"
}
},
...
{
"object_created": "2016-07-23T20:35:26.129Z",
"object_id": "aab1d7c0559d43ccbba4ff8603089e56",
"status": "DELIVERED",
"status_details": "Your shipment has been delivered at the destination mailbox.",
"status_date": "2016-07-23T13:03:00Z",
"location": {
"city": "Spotsylvania",
"state": "VA",
"zip": "22551",
"country": "US"
}
}
]
}
Extra notes:
Alexander T.
100% (2)Projects Completed
3
Freelancers worked with
2
Projects awarded
67%
Last project
15 Sep 2017
United States
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
HI,
I already have experienced working on similar task, can you please share your budget and dead line so i can submit my proposal thanks, waiting for your quick response. -
Hi,
The data needs to be stored in database or you just wants to display it?
Regards
457916457657
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies