PHP Backup Class using PHP and JSON
4774
£100(approx. $126)
- Posted:
- Proposals: 2
- Remote
- #62871
- Archived
Description
Experience Level: Intermediate
Backup Specification
We require a PHP class to take JSON data files and convert it to CSV files. Zipping of said files and then emailing or downloading. The class should have an interface that can be called via webpage that allows the user to choose options for the backup.
As there are multiple files we would require multiple CSV files to be returned. We do not want the data to be merged into one file.
The class web interface should allow the user to specify the encoding options, field enclosing characters and delimiting character. Sensible defaults should be applied to encoding, delimiters and enclosing characters if unspecified.
Email or download should be allowed as an option. When downloading auto generate a filename but allow the user to specify a filename if desired. If the user chooses to email then allow them to specify an email address. This should default to download when the user clicks “backup”.
Also include a checkbox that zips the file on request. This zip file should be readable on Windows and Mac machines.
By default there are nine separate files that will need to be read and stored as csv. Some files may return no data, in this case see the file “nodata.json”. Empty csv files can be created for this instance.
Also note that if there is only one record then the outputted json varies slightly from returned json with more than one record. This can be seen in the file named “onerecord.json”
As fields vary from one file to another the function that makes the csv file should be able to dynamically read the fieldnames and then the fields for each file. An example of the type of file is found in data.json. We are interested in the data in each “rec” array, where ‘val’ is the name of the field and ‘content’ is the contents of said field. Each of these should be made into a line in our csv file.
Supplied
We will supply the JSON data files for use by this class: data.json, onerecord.json and nodata.json (See attached).
Deliverables
A fully working PHP 5+ Class that fulfils the specification above.
Any supplemental files for this class (includes/JavaScript libraries etc.)
Will review all bids by Monday the 14th March, and will expect your work to be complete by Friday 18th March 2011.
We require a PHP class to take JSON data files and convert it to CSV files. Zipping of said files and then emailing or downloading. The class should have an interface that can be called via webpage that allows the user to choose options for the backup.
As there are multiple files we would require multiple CSV files to be returned. We do not want the data to be merged into one file.
The class web interface should allow the user to specify the encoding options, field enclosing characters and delimiting character. Sensible defaults should be applied to encoding, delimiters and enclosing characters if unspecified.
Email or download should be allowed as an option. When downloading auto generate a filename but allow the user to specify a filename if desired. If the user chooses to email then allow them to specify an email address. This should default to download when the user clicks “backup”.
Also include a checkbox that zips the file on request. This zip file should be readable on Windows and Mac machines.
By default there are nine separate files that will need to be read and stored as csv. Some files may return no data, in this case see the file “nodata.json”. Empty csv files can be created for this instance.
Also note that if there is only one record then the outputted json varies slightly from returned json with more than one record. This can be seen in the file named “onerecord.json”
As fields vary from one file to another the function that makes the csv file should be able to dynamically read the fieldnames and then the fields for each file. An example of the type of file is found in data.json. We are interested in the data in each “rec” array, where ‘val’ is the name of the field and ‘content’ is the contents of said field. Each of these should be made into a line in our csv file.
Supplied
We will supply the JSON data files for use by this class: data.json, onerecord.json and nodata.json (See attached).
Deliverables
A fully working PHP 5+ Class that fulfils the specification above.
Any supplemental files for this class (includes/JavaScript libraries etc.)
Will review all bids by Monday the 14th March, and will expect your work to be complete by Friday 18th March 2011.
K H.
100% (31)Projects Completed
24
Freelancers worked with
16
Projects awarded
57%
Last project
29 Jan 2020
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
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