I have WordpressTheme and in my MySql Database is Stored a Value like the following.
Its an Optionlist that shows up in an Form, but I never saw something like this.
Any Ideas what this is and how to handle with it?
Or where do find a Documentation about it.
a:9:{i:0;a:4:{s:8:"cssClass";s:8:"textarea";s:8:"required";s:9:"undefined";s:6:"values";s:53:"Script (Copy Paste your Script here or Upload a File)";
That is a string representing a serialized PHP object.
You can get more information about PHP serialization on http://php.net/manual/function.serialize.php
Wordpress and some plugins use PHP serialization to store some internal settings in a database easily.
That's the result of PHP serialize(). You can decode it with unserialize().
Related
I'm trying to use a full page redirect with a direct integration and if I'm reading the documentation correctly I believe I should be able to generate the server side JSON to pass into RealexHpp.redirect. I know the code to generate this JSON is shared in a number of languages, but is the raw JSON output shared anywhere? I ask as the language I'm writing in isn't one of the ones covered, so I'm trying to make sure I get the output format correct.
I've tried re-creating the JSON structure based on what I believe the Java code displayed should output, but I'm obviously doing something wrong as its not working, would be really useful if I had some raw JSON to compare it against to make sure I'm getting the structure right.
Many thanks,
Raw JSON examples are not available, but we do have HTML POST examples (https://developer.globalpay.com/hpp/card-payments). You can build a JSON based on these.
This is how the JSON should look like: {"MERCHANT_ID":"MerchantId","ACCOUNT":"internet","ORDER_ID":"N6qsk4kYRZihmPrTXWYS6g","AMOUNT":"1999","CURRENCY":"EUR","TIMESTAMP":"20221121100715","AUTO_SETTLE_FLAG":"1","SHIPPING_CODE":"50001|Apartment 825","SHIPPING_CO":"US","HPP_SHIPPING_STREET1":"Apartment 825","HPP_SHIPPING_STREET2":"Complex 741","HPP_SHIPPING_STREET3":"House 963","HPP_SHIPPING_CITY":"Chicago","HPP_SHIPPING_STATE":"IL","HPP_SHIPPING_POSTALCODE":"50001","HPP_SHIPPING_COUNTRY":"840","BILLING_CODE":"59|123","BILLING_CO":"GB","HPP_BILLING_STREET1":"Flat 123","HPP_BILLING_STREET2":"House 456","HPP_BILLING_STREET3":"Unit 4","HPP_BILLING_CITY":"Halifax","HPP_BILLING_POSTALCODE":"W5 9HR","HPP_BILLING_COUNTRY":"826","HPP_CUSTOMER_EMAIL":"james.mason#example.com","HPP_CUSTOMER_PHONENUMBER_MOBILE":"44|07123456789","HPP_PHONE":"44|07123456789","HPP_ADDRESS_MATCH_INDICATOR":"FALSE","HPP_VERSION":"2","SHA1HASH":"308bb8dfbbfcc67c28d602d988ab104c3b08d012"}
I am new to wso2 API Manager, trying to set it up expose my plain HTTP POST back end calls as a REST API. I am sure this is not a new pattern that I am trying to achieve here. The requirement is to convert the JSON data coming in (has array structures) into the HTTP URL query string parameters.
After some research through the documentation and other posts on this forum, decided to go with the script mediator that would parse the JSON data and convert it to a string that can be appended to the endpoint URL. Some how I am not able to achieve this.
I have followed the following post that seems to be very straight forward. As the original poster suggested, I am also not able to use getPayloadJSON() method. Even have trouble using the work around suggested there due to JSON.parse() not working.
Link
Also, this approach of editing the service bus configuration from source view does not sound like the correct option. Is there another elegant solution to achieve this? Thanks for the help in advance.
I was able to get both methods working by using an external script instead of the inline java script. Thanks
I'd like to know if it's possible to turn a Json file API like this one :
http://graph.facebook.com/10152830671619648/photos?fields=id,name,source
to a MySQL data table in a database.
What language shall I use for this ? PHP, Javascript ?
Thanks for answering !
EDIT : Actually, I'd like to create a system to manage the comics I need to buy with a simple interface. All the information about a comic book will be stored in a database (id, name, image link, if I need it, if I have it, if I read it).
In PHP, there are several ways to get the JSON object from url including fopen, get_file_contents and curl, the latter being the more reliable option if there are restrictions on the server.
JSON url to PHP object:
- Get JSON object from URL
Serialize and store to db:
- How do I store an php object in a MySQL table?
or write object properties to db table columns:
- mysqli: http://php.net/manual/en/mysqli-stmt.bind-param.php pdo:
- http://php.net/manual/en/pdostatement.bindparam.php
JavaScript can be used as well, using Ajax to both retrieve the JSON object and to store it in the db e.g. by sending it to a server-side script which do the storing. You can use PHP, PHP and JavaScript (Ajax), JavaScript and some JavaScript Ajax APIs, etc.
I am trying to achieve something like which is mentioned in this link
but i don't know whereto write the parsing code. I tried to write it in new method and added the method in "my adapter.xml" but nothing happens. I even don't know how to log in IBM WorkLight. I used WL.logger(some) but its throwing error that "Logger can not be called on an object".
Any help would be appreciated. Thanks in advance.!
In most cases you don't need to manually parse responses because WL adapter framework will do this for you. Anything you retrieve via WL.Server.invokeHttp API will be parsed to JSON automatically unless you specify returnedContentType:"plain". In case you DO need to manually parse JSON you can use JSON.parse() and JSON.stringify() APIs.
Server side logging is achieved via WL.Logger.debug/error/info etc. You can get more info about it here
You don't have to parse JSON data, there are libraries in Javascript to do that. Try JSON.parse(). You should learning how to write adapters and invoking them from clients. The Getting Started modules are a good place to start, specifically Module 4 in your case.
I've been using Google Tools (library, templating) for almost a year... and I came to the point where a I have to connect the backend with all the templates i've been working on. The backend receives the data in JSON format.
Here's my problem. I want to submit a JSON that represents my object model in the backend and I know closure library offers this...
var json = goog.json.serialize(goog.dom.forms.getFormDataMap(form).toObject());
Problem is that the method getFormDataMap returns a goog.structs.Map which works like a hashMap... It means that all values of the form submitted are nested into arrays.
I was wondering if anyone has found a solution to this. I know that there is some library that does the trick like this one (https://github.com/maxatwork/form2js) but I can't believe that closure doesn't have anything to deal with this problem.
Thanks a lot !
why not access the data yourself and build the data structure you require, it is not like this will be a bottleneck of any sorts.