Kevin Smith
Kevin Smith

Reputation: 139

What type of database is this?

Hi one of my clients has been screwed over by their SEO firm. This firm have used a pretty extensive PHP script which relies on a data feed coming from their servers. I have found a copy of this feed in several .txt files on the users server, and it looks like its in some form of database format. It does not look like MySQL to me, so I was wondering if you guys could help me by identifying it?

A snippet is below:

{"filename":"example xx Example","content":[{"title":{"1":"xx example\r\nexample in xx\r\nexample in the xx region\r\nexample in the xx area","2":"","3":"","4":""}

This is just part of it to give you an idea.

I would like to be able to remove the Feed and create a PHP file which can read the variables the script sends, and then outputs what it should preferably from a MySQL database. But I need to convert it from the above form to MySQL first.

Any ideas on the format and converting it?

Many thanks,

Kevin

Upvotes: 1

Views: 83

Answers (3)

Spencer Ruport
Spencer Ruport

Reputation: 35117

That's JSON data.

You can read more about it here: http://www.json.org/

Upvotes: 1

David Chan
David Chan

Reputation: 7505

looks like JSON

http://json.parser.online.fr/

Upvotes: 1

rid
rid

Reputation: 63610

It looks like what someone would typically store in a document database such as MongoDB. The format is free-form JSON, so you'd need to parse it and interpret it yourself. If you use PHP, json_decode() will help with parsing, by taking the JSON string you have and converting it to native PHP arrays. You can then do whatever you want with the generated arrays, including saving them to a MySQL database or generating an RSS feed from them.

Upvotes: 5

Related Questions