387 Topics
| |
Hi I have written a json file using php. But i am unable to display the css style. can any please help me to fix the issue. **my json code** <?php require_once('config.php'); function jde_date_conv($jde_date) { $ct = substr($jde_date,0,1); $yr = substr($jde_date,1,2); $dy = substr($jde_date,3,3); if($ct == 0)$yr_pfx=19; if($ct == 1)$yr_pfx=20; … | |
{"courseId":"116","question":"asdasd","ansIndex":"1","ans0":"sadsa","ans1":"dsad","ans2":"sadasd","ans3":"asdasd"} This is my Json String......How to Convert In to Xml File | |
my json decode script throwing error i.e. Error : DATA FETCH My code: <?php $api_url = '{"msg":"SUCCESS","msg_text":"DATA FETCH","data":[{"sn":1,"mob_no":"9602858989","date":"06-May-2015","time":"12:02:33 PM"},{"sn":2,"mob_no":"7795055128","date":"06-May-2015","time":"12:29:44 PM"}]}'; $output = file_get_contents($api_url); if($output=="") { echo "No output received"; } else { $arr_output = json_decode($output, true); if(isset($arr_output['msg'])) { $msg = $arr_output['msg']; $msg_text = $arr_output['msg_text']; if($msg == "success") { if(isset($arr_output['data'])) { … | |
hi, so im trying to get the course names and teachers printed from the JSON file and having trouble linking it to the drop down please help :) html code <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Course Info</title> </head> <body> <h1>Course Information Search</h1> <form action="" method="GET"> <select name="course" id="course"> … | |
model controller function viewdashboard(){ $this->load->model('AgentPerformance/agentPerformance_model'); $value = $this->agentPerformance_model->dashboard(); //echo $value; return $value; view <html> <head> <script src="http://code.highcharts.com/highcharts.js"></script> <script src="http://code.highcharts.com/modules/exporting.js"></script> <script> $(function () { $('#container').highcharts({ chart: { plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false }, title: { //alert('ttttt'); text: 'Browser market shares at a specific website, 2014' }, tooltip: { pointFormat: '{series.name}: … | |
angular .module('abc') .factory('dashboard', dashboard); function dashboard($http, notifier) { var service = { getAllMasterJobsNames: getAllMasterJobsNames }; return service; function getAllMasterJobsNames(request) { return $http.post('/JSONServices/JSONCampusManagementService.svc/GetAllMasterJobsNames', request).then( function (response) { if (angular.isUndefined(response.data) || (angular.isDefined(response.data.IsException) && response.data .IsException)) { notifier.error('Error fetching the Active Events : ' + JSON.stringify(response)); } return response; }, function (response) { … | |
Hi guys I am attempting to get data entered in an HTML form through PHP then converting this data into a JSON object which will be saved on a server and retrieved to the form incase someone wants to edit entries. Please help and advice on an alternative if you … | |
I the objective of the code that I attached this note is to Collect data in a form. Post to a PHP file where the collected information is turned into a JSON Write the JSON information to a file Return the JSON and print it to the an ID in … | |
I'm trying to make a curl through php below is the command line : curl -i -H "Accept: application/json" -d "{"username": "divmesselibrary", "password": "677Sure1@"}" https://openlibrary.org/account/login Please I need your help | |
I am able to view content displayed from the API but i'm not able to extract the various contents. my codes are below: function parseInfo($barcode) { $url = "https://archive.org/advancedsearch.php?q=$barcode+AND+licenseurl:[http://creativecommons.org/a+TO+http://creativecommons.org/z]&fl[]=identifier,title,mediatype,collection&rows=15&output=json&callback=IAE.search_hits"; $contents = file_get_contents($url); // $json = json_decode($contents, true); return $contents; } echo $array = parseInfo($barcode); //var_dump($json); for ($i = 0; $i … | |
I've used different methods and found it difficult to integrate mashape for a dictionary.. My code is below: require_once 'unirest-php/src/Unirest.php'; // These code snippets use an open-source library. $response = Unirest\Request::get("https://montanaflynn-dictionary.p.mashape.com/define?word=irony", array( "X-Mashape-Key" => "T2rwS1jyBSmshKoZB5Un2kfpvgtRp1hUS9pjsnHvPoGNHIMpda", "Accept" => "application/json" ) ); What am I not getting right Regards | |
I'm not able to get the content of this array, please can someone help? Where Am I getting it wrong? Below is the code $barcode = "9780980200447"; function parseInfo($barcode) { $url = "http://www.librarything.com/api_getdata.php?userid=timspalding&showstructure=1&max=10&showReviews=1&showTags=1&reviewsOnly=1&name=Jesus+is+Lord&&apikey=b27cb381baddff9c49b9dd27d9d96651&responseType=json"; $contents = file_get_contents($url); $json = json_decode($contents, true); return $json; } $array = (parseInfo($barcode)); //print_r($array); foreach ($array as … | |
why this code give error like "Warning: json_decode() expects parameter 1 to be string, array given in <b>E:\wamp\www\datefun\show_cart_update.php</b> on line". Please help me. I am new in php and json <html> <head> <title>Untitled Document</title> <script src="js/jquery-1.9.1.min.js"></script> </head> <body> <script> function update_cart_detail() { var aData = new Array(); aData[0]={ "session_id":"64qu9ng2o8o996s21bjt9321h1", "order_id":"26", … | |
Hello everyone Now my problem is how to make oracle take json string in oracle procedure , so i know that only oracle 12c specifically version 102 supports json data , so i want to know how to get a json string from web application rather than using XML data … | |
Hi, i'm trying to implement a flot.js graph using a custom php array as data. Here is what i've done : <?php foreach ( $dynamic_prices as $limit => $price ): $coordonnees[] = array($limit,$price); endforeach; ?> <?php echo json_encode(($coordonnees), JSON_NUMERIC_CHECK); ?> This code outputs : [[5,9],[6,8]] is it the right format … | |
so i have the following data in all-names.json { "copyright": "Copyright (c) 2014 The New York Times Company. All Rights Reserved.", "num_results": 44, "results": [ { "display_name": "Print & E-Book Fiction", "list_name": "Combined Print and E-Book Fiction", "list_name_encoded": "combined-print-and-e-book-fiction", "newest_published_date": "2014-12-14", "oldest_published_date": "2011-02-13", "updated": "WEEKLY" }, { "display_name": "Print & … | |
i want to know how i can get a json response from my node.js server and display the response on my web page ` var request = require("request"), username = req.body.username, password = req.body.password, url = "https://api.ecoachsolutions.com/main.php?ecoachsignin=1&server=remote&user="+username+"&pass="+password; console.log("url is "+url); request.get( { url : url }, function (error, response, body) … | |
Hello, I'm working on a small project to acquire information from regulations.gov using their API. It's fairly simple (codewise) what I'm trying to do. However, I get stuck with a "HTTP error 403: Forbidden". It means I'm connecting, but something seems to be the matter. I've been in contact with … | |
I've a json structure : { "Photos":{ "Photo":[ { "ID" : 111, "type" : "JPEG", "URL": "blabla" }, { "ID": 222, "type": "JPG", "URL": "blaaaaaaaaa" } ] } } Using php-jsonpath only (By stefan Goessner : http://goessner.net/articles/JsonPath), I want to insert a new data (array) into photo identified by 222 … | |
Hello ! I'm trying to build a link between an applet in java and php. My applet in Java sends data to php. And then php writes data in the database. I use json object my code in java : public static void main(String[] args) { // TODO Auto-generated method … | |
Hello, I want to show select list in angular js Data is in .php file in json format as below: `["{\"0\":\"949\",\"user_id\":\"949\",\"gslab_id\":\"GS-0835\"}","{\"0\":\"493\",\"user_id\":\"493\",\"gslab_id\":\"GS-0451\"}","{\"0\":\"338\",\"user_id\":\"338\",\"gslab_id\":\"GS-0322\"}","{\"0\":\"961\",\"user_id\":\"961\",\"gslab_id\":\"GS-0843\"}","{\"0\":\"444\",\"user_id\":\"444\",\"gslab_id\":\"GS-0409\"}"]` what I have written till is in my index.php file: <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script> <script src="myNoteApp.js"></script> <body ng-app="mainApp"> <div ng-controller="mainController"> <select> <option ng-repeat="category in content" value="{{category.user_id}}"> {{category.user_id}} </option> </select> </div> </body> … | |
Can anyone help me clear this issue ? I have a JsonMaker class as: class JsonMaker { protected $jsonObj; protected $path; function __construct($filepath) { $this->path = $filepath; $str = file_get_contents($this->path, true); $this->jsonObj = json_decode($str, false); } public function Test_1($rootName){ $file = file_get_contents($filepath, true); $data = json_decode($file, false); foreach ($data->{$rootName} as … | |
Good day everyone. I am trying to simulate (with php), an xml-like structure for json as follows: { "Articles": [ { "Article": { "ID": 111, "title": Origin of man", "author": "Man and Woman", "pubDate": "21st Feb, 2014", "summary": "Both Idiots" } }, { "Article": { "ID": 222, "title": "Origin of … | |
Hello, I have a app where each page has an undefined number of tables (Meaning on one page we may have 3 tables and on another we may have 15). They are all dynamically populated with values from a MySQL Database, creating a template of sorts. The idea behind this … | |
i am running PHP Version 5.2.9, i want to create a barchart from data in mysql. i got this sumple and tried running it. am having a bit if trouble with json_encode(). i have an array that has numbers and strings but the numbers get printed back as strings. how … | |
Hello there :) I got this json: http://steamcommunity.com/id/spekat/inventory/json/730/2 In place of "spekat" - has different account names with different information. I want to get "classid" index with information (like numbers) Now my code is like this: <?php $urljson2 = file_get_contents("http://steamcommunity.com/id/$steam_acc/inventory/json/730/2/"); $json_decode2 = json_decode($urljson2); $inventory = $json_decode2->rgInventory->classid; ?> But not work, … | |
Hi,, I have a json file and I would like to convert it into java class. The main aim is to create a dynamic interface from the JSON file. I found metawidget library which can generate interface from a java class. I would like to know or possibly a sample … | |
**{"title":"iamtitle","icon":"","urlHistory":["http://google.com"],"lastUsed":123}** I have tried in c++ and using json-glib. I have tried using this: g_type_init(); JsonParser *parser = json_parser_new(); json_parser_load_from_data(parser, temp.c_str(), -1, NULL); JsonReader *reader = json_reader_new(json_parser_get_root(parser)); json_reader_read_member(reader,"urlHistory"); JsonNode * value = json_reader_get_value(reader); JsonArray * value1 = json_node_get_array(value); const char * urlhistory = json_array_get_string_element(value1,0); tab.history = urlhistory; json_reader_end_element(reader); cout << … | |
Hey guys, <?php $url = "https://api.twitch.tv/kraken/streams/greatbritishbg"; $json = file_get_contents($url); $json = json_decode($json); var_dump($json); foreach($json->streams as $stream) { echo $stream->channel->stream . '<br />'; echo $stream->channel->display_name . ' is playing ' . $stream->channel->game . '.<br />'; echo '<a href="http://www.twitch.tv/' . $stream->channel->name . '">Watch Live</a>'; echo '<hr />'; $status = $stream->channel->stream; } //PSUEDO … | |
I am creating one json array using Json-glib using c++. Here is the data: title="Daniweb" (string) last= 1234 (long) icon="icons" (string) url = "[\"dani.com\"]" (json array) After making one json array using exsiting APIs of json-glib library, I got this: {"id":"Nitin1","clientName":"Gourav_first_task","tabs":"[{\"title\":\"Daniweb\",\"icon\":\"icons\",\"urlHistory\":\"[\\\"Dani.com\\\"]\",\"lastUsed\":1234}]"} Is it the correct json string made? It has … |
The End.