387 Topics

Member Avatar for
Member Avatar for rpv_sen

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; …

Member Avatar for rpv_sen
0
518
Member Avatar for Vivek_13

{"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

Member Avatar for diafol
0
312
Member Avatar for blueguy777

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'])) { …

Member Avatar for blueguy777
0
316
Member Avatar for chichi9

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"> …

Member Avatar for mrsixcount
0
194
Member Avatar for amaya Gimhani

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}: …

0
161
Member Avatar for Bchandaria

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) { …

0
193
Member Avatar for jchimz

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 …

Member Avatar for jchimz
0
380
Member Avatar for rouse

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 …

Member Avatar for rouse
0
562
Member Avatar for Prince_9

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

Member Avatar for broj1
0
329
Member Avatar for Prince_9

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 …

Member Avatar for Prince_9
0
225
Member Avatar for Prince_9

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

Member Avatar for Prince_9
0
295
Member Avatar for Prince_9

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 …

Member Avatar for broj1
0
356
Member Avatar for singhsd2005

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", …

Member Avatar for diafol
0
451
Member Avatar for fedaa91

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 …

Member Avatar for fedaa91
0
145
Member Avatar for Olivier_1

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 …

Member Avatar for Olivier_1
0
259
Member Avatar for widy_1

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 & …

0
65
Member Avatar for Benjamin_4

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) …

0
119
Member Avatar for ben.juarez.773

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 …

Member Avatar for richieking
0
518
Member Avatar for Osagie_1

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 …

Member Avatar for Traevel
0
276
Member Avatar for superlucile

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 …

Member Avatar for diafol
0
337
Member Avatar for Priti_P

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> …

Member Avatar for Traevel
0
169
Member Avatar for Osagie_1

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 …

Member Avatar for broj1
0
127
Member Avatar for Osagie_1

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 …

Member Avatar for diafol
0
270
Member Avatar for zlhysong

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 …

Member Avatar for diafol
0
171
Member Avatar for liphoso

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 …

Member Avatar for liphoso
0
576
Member Avatar for grakovski

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, …

Member Avatar for gabrielcastillo
0
462
Member Avatar for srikanth2321

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 …

Member Avatar for Richard_21
0
257
Member Avatar for nitin1

**{"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 << …

0
313
Member Avatar for bradly.spicer

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 …

Member Avatar for bradly.spicer
0
566
Member Avatar for nitin1

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 …

Member Avatar for mike_2000_17
0
178

The End.