Random image generator from Imgur album - php

I'm looking to create an Apache site using PHP so that each time a person directs to it, it will grab a random image from a previously created Imgur album full of images and display the image onload without ever leaving the website. I am thinking I would need to use the Imgur API to make this sort of thing with php but I don't know where to start. Does anybody know how I may be able to do this?
I made this javascript alternative using arrays but this only fetches images listed in the javascript code, I would like to make use of the Imgur API and automatically fetch all the images' URLs from the Imgur album and randomly pick one to display every time the user loads the webpage.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Random</title>
<script type="text/javascript">
function randomlinks(){
var myrandom=Math.round(Math.random()*263)
var links=new Array()
links[0]="http://i.imgur.com/blablablabla.jpg"
window.location=links[myrandom]
}
</script>
</head>
<body onload="randomlinks()">
</body>
</html>

This is a json returned from an album using the imgur api, you can transform this json into an array within PHP and then use array_rand() to select a random one:
{
"data": {
"id": "lDRB2",
"title": "Imgur Office",
"description": null,
"datetime": 1357856292,
"cover": "24nLu",
"account_url": "Alan",
"account_id": 4,
"privacy": "public",
"layout": "blog",
"views": 13780,
"link": "http://alanbox.imgur.com/a/lDRB2",
"images_count": 11,
"images": [
{
"id": "24nLu",
"title": null,
"description": null,
"datetime": 1357856352,
"type": "image/jpeg",
"animated": false,
"width": 2592,
"height": 1944,
"size": 855658,
"views": 135772,
"bandwidth": 116174397976,
"link": "http://i.imgur.com/24nLu.jpg"
},
{
"id": "Ziz25",
"title": null,
"description": null,
"datetime": 1357856394,
"type": "image/jpeg",
"animated": false,
"width": 2592,
"height": 1944,
"size": 919391,
"views": 135493,
"bandwidth": 124571044763,
"link": "http://i.imgur.com/Ziz25.jpg"
},
{
"id": "9tzW6",
"title": null,
"description": null,
"datetime": 1357856385,
"type": "image/jpeg",
"animated": false,
"width": 2592,
"height": 1944,
"size": 655028,
"views": 135063,
"bandwidth": 88470046764,
"link": "http://i.imgur.com/9tzW6.jpg"
},
{
"id": "dFg5u",
"title": null,
"description": null,
"datetime": 1357856378,
"type": "image/jpeg",
"animated": false,
"width": 2592,
"height": 1944,
"size": 812738,
"views": 134704,
"bandwidth": 109479059552,
"link": "http://i.imgur.com/dFg5u.jpg"
},
{
"id": "oknLx",
"title": null,
"description": null,
"datetime": 1357856338,
"type": "image/jpeg",
"animated": false,
"width": 1749,
"height": 2332,
"size": 717324,
"views": 32938,
"bandwidth": 23627217912,
"link": "http://i.imgur.com/oknLx.jpg"
},
{
"id": "OL6tC",
"title": null,
"description": null,
"datetime": 1357856321,
"type": "image/jpeg",
"animated": false,
"width": 2592,
"height": 1944,
"size": 1443262,
"views": 32346,
"bandwidth": 46683752652,
"link": "http://i.imgur.com/OL6tC.jpg"
},
{
"id": "cJ9cm",
"title": null,
"description": null,
"datetime": 1357856330,
"type": "image/jpeg",
"animated": false,
"width": 2592,
"height": 1944,
"size": 544702,
"views": 31829,
"bandwidth": 17337319958,
"link": "http://i.imgur.com/cJ9cm.jpg"
},
{
"id": "7BtPN",
"title": null,
"description": null,
"datetime": 1357856369,
"type": "image/jpeg",
"animated": false,
"width": 2592,
"height": 1944,
"size": 844863,
"views": 31257,
"bandwidth": 26407882791,
"link": "http://i.imgur.com/7BtPN.jpg"
},
{
"id": "42ib8",
"title": null,
"description": null,
"datetime": 1357856424,
"type": "image/jpeg",
"animated": false,
"width": 2592,
"height": 1944,
"size": 905073,
"views": 30945,
"bandwidth": 28007483985,
"link": "http://i.imgur.com/42ib8.jpg"
},
{
"id": "BbwIx",
"title": null,
"description": null,
"datetime": 1357856360,
"type": "image/jpeg",
"animated": false,
"width": 1749,
"height": 2332,
"size": 662413,
"views": 30107,
"bandwidth": 19943268191,
"link": "http://i.imgur.com/BbwIx.jpg"
},
{
"id": "x7b91",
"title": null,
"description": null,
"datetime": 1357856406,
"type": "image/jpeg",
"animated": false,
"width": 1944,
"height": 2592,
"size": 618567,
"views": 29259,
"bandwidth": 18098651853,
"link": "http://i.imgur.com/x7b91.jpg"
}
]
},
"success": true,
"status": 200
}
More information in the IMGUR API Documentation
Being $json the string coming from imgur servers, this code will gather a random link:
$array=json_decode($json);
$links = array();
foreach($array->data->images as $img)
$links[]=$img->link;
echo $links[array_rand($links)];

Related

How to access object inside multidimensional array with json decode in PHP?

I'm struggling with accessing elements of arrays. I'm sure it's easy but I always get undefined index errors.
Display Array :
// Get response
$synresponse = curl_exec($chs);
// Decode
$variants = json_decode($synresponse, true);
Returns :
{
"code": 200,
"result": {
"sync_product": {
"id": 118425517,
"external_id": "5d02e1420b4007",
"name": "Women's Crop Top",
"variants": 4,
"synced": 4
},
"sync_variants": [
{
"id": 1335801688,
"external_id": "5d02e1420b4141",
"sync_product_id": 118425517,
"name": "Women's Crop Top - S",
"synced": true,
"variant_id": 8039,
"retail_price": "22.50",
"currency": "USD",
"product": {
"variant_id": 8039,
"product_id": 224,
"image": "https://d1yg28hrivmbqm.cloudfront.net/products/224/8039_1550478004.jpg",
"name": "Los Angeles Apparel 2332 Fine Jersey Short Sleeve Cropped T-Shirt /w Tear Away Label (White / S)"
},
"files": [
{
"id": 120674338,
"type": "default",
"hash": "6238a66581153315488397a5788216b2",
"url": null,
"filename": "logo2.png",
"mime_type": "image/png",
"size": 163254,
"width": 1380,
"height": 1380,
"dpi": null,
"status": "ok",
"created": 1560465358,
"thumbnail_url": "https://d1yg28hrivmbqm.cloudfront.net/files/623/6238a66581153315488397a5788216b2_thumb.png",
"preview_url": "https://d1yg28hrivmbqm.cloudfront.net/files/623/6238a66581153315488397a5788216b2_preview.png",
"visible": true
},
{
"id": 120686478,
"type": "preview",
"hash": "fa1a4b2f561f28529f4230ba49eca1db",
"url": null,
"filename": "mockup-79b7c377.png",
"mime_type": "image/png",
"size": 113878,
"width": 600,
"height": 600,
"dpi": 43,
"status": "ok",
"created": 1560469826,
"thumbnail_url": "https://d1yg28hrivmbqm.cloudfront.net/files/fa1/fa1a4b2f561f28529f4230ba49eca1db_thumb.png",
"preview_url": "https://d1yg28hrivmbqm.cloudfront.net/files/fa1/fa1a4b2f561f28529f4230ba49eca1db_preview.png",
"visible": false
}
],
"options": []
},
{
"id": 1335801689,
"external_id": "5d02e1420b41b9",
"sync_product_id": 118425517,
"name": "Women's Crop Top - M",
"synced": true,
"variant_id": 8040,
"retail_price": "22.50",
"currency": "USD",
"product": {
"variant_id": 8040,
"product_id": 224,
"image": "https://d1yg28hrivmbqm.cloudfront.net/products/224/8040_1550478002.jpg",
"name": "Los Angeles Apparel 2332 Fine Jersey Short Sleeve Cropped T-Shirt /w Tear Away Label (White / M)"
},
"files": [
{
"id": 120674338,
"type": "default",
"hash": "6238a66581153315488397a5788216b2",
"url": null,
"filename": "logo2.png",
"mime_type": "image/png",
"size": 163254,
"width": 1380,
"height": 1380,
"dpi": null,
"status": "ok",
"created": 1560465358,
"thumbnail_url": "https://d1yg28hrivmbqm.cloudfront.net/files/623/6238a66581153315488397a5788216b2_thumb.png",
"preview_url": "https://d1yg28hrivmbqm.cloudfront.net/files/623/6238a66581153315488397a5788216b2_preview.png",
"visible": true
},
{
"id": 120686478,
"type": "preview",
"hash": "fa1a4b2f561f28529f4230ba49eca1db",
"url": null,
"filename": "mockup-79b7c377.png",
"mime_type": "image/png",
"size": 113878,
"width": 600,
"height": 600,
"dpi": 43,
"status": "ok",
"created": 1560469826,
"thumbnail_url": "https://d1yg28hrivmbqm.cloudfront.net/files/fa1/fa1a4b2f561f28529f4230ba49eca1db_thumb.png",
"preview_url": "https://d1yg28hrivmbqm.cloudfront.net/files/fa1/fa1a4b2f561f28529f4230ba49eca1db_preview.png",
"visible": false
}
],
"options": []
},
{
"id": 1335801690,
"external_id": "5d02e1420b41f3",
"sync_product_id": 118425517,
"name": "Women's Crop Top - L",
"synced": true,
"variant_id": 8041,
"retail_price": "22.50",
"currency": "USD",
"product": {
"variant_id": 8041,
"product_id": 224,
"image": "https://d1yg28hrivmbqm.cloudfront.net/products/224/8041_1550478000.jpg",
"name": "Los Angeles Apparel 2332 Fine Jersey Short Sleeve Cropped T-Shirt /w Tear Away Label (White / L)"
},
"files": [
{
"id": 120674338,
"type": "default",
"hash": "6238a66581153315488397a5788216b2",
"url": null,
"filename": "logo2.png",
"mime_type": "image/png",
"size": 163254,
"width": 1380,
"height": 1380,
"dpi": null,
"status": "ok",
"created": 1560465358,
"thumbnail_url": "https://d1yg28hrivmbqm.cloudfront.net/files/623/6238a66581153315488397a5788216b2_thumb.png",
"preview_url": "https://d1yg28hrivmbqm.cloudfront.net/files/623/6238a66581153315488397a5788216b2_preview.png",
"visible": true
},
{
"id": 120686478,
"type": "preview",
"hash": "fa1a4b2f561f28529f4230ba49eca1db",
"url": null,
"filename": "mockup-79b7c377.png",
"mime_type": "image/png",
"size": 113878,
"width": 600,
"height": 600,
"dpi": 43,
"status": "ok",
"created": 1560469826,
"thumbnail_url": "https://d1yg28hrivmbqm.cloudfront.net/files/fa1/fa1a4b2f561f28529f4230ba49eca1db_thumb.png",
"preview_url": "https://d1yg28hrivmbqm.cloudfront.net/files/fa1/fa1a4b2f561f28529f4230ba49eca1db_preview.png",
"visible": false
}
],
"options": []
},
{
"id": 1335801691,
"external_id": "5d02e1420b4238",
"sync_product_id": 118425517,
"name": "Women's Crop Top - XL",
"synced": true,
"variant_id": 8042,
"retail_price": "22.50",
"currency": "USD",
"product": {
"variant_id": 8042,
"product_id": 224,
"image": "https://d1yg28hrivmbqm.cloudfront.net/products/224/8042_1550478006.jpg",
"name": "Los Angeles Apparel 2332 Fine Jersey Short Sleeve Cropped T-Shirt /w Tear Away Label (White / XL)"
},
"files": [
{
"id": 120674338,
"type": "default",
"hash": "6238a66581153315488397a5788216b2",
"url": null,
"filename": "logo2.png",
"mime_type": "image/png",
"size": 163254,
"width": 1380,
"height": 1380,
"dpi": null,
"status": "ok",
"created": 1560465358,
"thumbnail_url": "https://d1yg28hrivmbqm.cloudfront.net/files/623/6238a66581153315488397a5788216b2_thumb.png",
"preview_url": "https://d1yg28hrivmbqm.cloudfront.net/files/623/6238a66581153315488397a5788216b2_preview.png",
"visible": true
},
{
"id": 120686478,
"type": "preview",
"hash": "fa1a4b2f561f28529f4230ba49eca1db",
"url": null,
"filename": "mockup-79b7c377.png",
"mime_type": "image/png",
"size": 113878,
"width": 600,
"height": 600,
"dpi": 43,
"status": "ok",
"created": 1560469826,
"thumbnail_url": "https://d1yg28hrivmbqm.cloudfront.net/files/fa1/fa1a4b2f561f28529f4230ba49eca1db_thumb.png",
"preview_url": "https://d1yg28hrivmbqm.cloudfront.net/files/fa1/fa1a4b2f561f28529f4230ba49eca1db_preview.png",
"visible": false
}
],
"options": []
}
]
},
"extra": []
}
I'm trying to access elements from files like this :
foreach($variants['result'] as $variant){
//access file images
$imgurl = $variant['files']['preview_url'];
echo '<img src="$imgurl">';
echo '<br>';
}
I get errors :
Notice: Undefined index: files
Notice: Undefined index: preview_url
Can someone explain to me what I am not understanding please?
My guess is that, there are multiple images, not sure which one would be desired, it could be any of these:
$variant['files'][1]['preview_url']
or
$variant['files'][0]['preview_url']
Test
$variants = json_decode($variants, true);
$html = '';
foreach ($variants['result']["sync_variants"] as $variant) {
$html .= '<img src="' . $variant['files'][1]['preview_url'] . '"><br>';
}
echo $html;
Output
<img src="https://d1yg28hrivmbqm.cloudfront.net/files/fa1/fa1a4b2f561f28529f4230ba49eca1db_preview.png"><br>
<img src="https://d1yg28hrivmbqm.cloudfront.net/files/fa1/fa1a4b2f561f28529f4230ba49eca1db_preview.png"><br>
<img src="https://d1yg28hrivmbqm.cloudfront.net/files/fa1/fa1a4b2f561f28529f4230ba49eca1db_preview.png"><br>
<img src="https://d1yg28hrivmbqm.cloudfront.net/files/fa1/fa1a4b2f561f28529f4230ba49eca1db_preview.png"><br>
This code should help. Problem was connected with additional sub array.
foreach($variants['result']['sync_variants'] as $variant) {
foreach($variant['files'] as $file) {
//access file images
$imgurl = $file['preview_url'];
echo '<img src="' . $imgurl . '">';
echo '<br>';
}
}
Answer to the comment:
foreach($variants['result']['sync_variants'] as $variant) {
foreach($variant['files'] as $file) {
if ($file['type'] != 'preview') {
continue;
}
//access file images
$imgurl = $file['preview_url'];
echo '<img src="' . $imgurl . '">';
echo '<br>';
}
}

Can any one help me using json data in foreach loop of php?

I am using below php code to use json in my file but i am not getting the ouput . I need to print image url from Json array . Can any one help.
Json data is :
{
"pagination": {},
"data": [
{
"id": "1980025670135540608_1039191866",
"user": {},
"images": {
"thumbnail": {
"width": 150,
"height": 150,
"url": "https://scontent.cdninstagram.com/vp/d3d00967ec82131dedfdddb0cb8f8bc7/5CFCE4F1/t51.2885-15/e35/s150x150/50959433_383283642451967_2367872435860221844_n.jpg?_nc_ht=scontent.cdninstagram.com"
},
"low_resolution": {
"width": 320,
"height": 320,
"url": "https://scontent.cdninstagram.com/vp/5cb939b696c2d5a0211572bd0e965bee/5CF41C01/t51.2885-15/e35/s320x320/50959433_383283642451967_2367872435860221844_n.jpg?_nc_ht=scontent.cdninstagram.com"
},
"standard_resolution": {
"width": 640,
"height": 640,
"url": "https://scontent.cdninstagram.com/vp/411df4ade429230dee0ab3631d25a6eb/5CE56DB3/t51.2885-15/e35/50959433_383283642451967_2367872435860221844_n.jpg?_nc_ht=scontent.cdninstagram.com"
}
},
"created_time": "1550257475",
"caption": null,
"user_has_liked": false,
"likes": {
"count": 0
},
"tags": {},
"filter": "Normal",
"comments": {
"count": 0
},
"type": "image",
"link": "https://www.instagram.com/p/Bt6dts6lWuA/",
"location": null,
"attribution": null,
"users_in_photo": {}
},
{
"id": "1979798389190546391_1039191866",
"user": {
"id": "1039191866",
"full_name": "Jagjeet Kumar",
"profile_picture": "https://scontent.cdninstagram.com/vp/9871a297c832e1b1ef249028856af412/5CFC0D7D/t51.2885-19/11931260_1465802173750145_760962573_a.jpg?_nc_ht=scontent.cdninstagram.com",
"username": "jagjeet_k"
},
"images": {
"thumbnail": {
"width": 150,
"height": 150,
"url": "https://scontent.cdninstagram.com/vp/5f7e27fbf6d878bb85be23b70b637866/5CF8244F/t51.2885-15/e35/s150x150/50801938_1432836230186365_4210258679421826307_n.jpg?_nc_ht=scontent.cdninstagram.com"
},
"low_resolution": {
"width": 320,
"height": 320,
"url": "https://scontent.cdninstagram.com/vp/16376fe1eb033705d1c7b1f394bef013/5CE38537/t51.2885-15/e35/s320x320/50801938_1432836230186365_4210258679421826307_n.jpg?_nc_ht=scontent.cdninstagram.com"
},
"standard_resolution": {
"width": 640,
"height": 640,
"url": "https://scontent.cdninstagram.com/vp/c51878930ed8c98a595f16299f5c18d7/5CF9E7CA/t51.2885-15/sh0.08/e35/s640x640/50801938_1432836230186365_4210258679421826307_n.jpg?_nc_ht=scontent.cdninstagram.com"
}
},
"created_time": "1550230381",
"caption": null,
"user_has_liked": false,
"likes": {
"count": 1
},
"tags": {},
"filter": "Crema",
"comments": {
"count": 1
},
"type": "image",
"link": "https://www.instagram.com/p/Bt5qCVCl9PX/",
"location": null,
"attribution": null,
"users_in_photo": {}
}
],
"meta": {
"code": 200
}
}
Php code which I am using :
<?php
$instagram_feed_data = json_decode($mediacount, true);
foreach ($instagram_feed_data->data as $item) {
$img_url = $item['images']['low_resolution']['url'];
?>
<img src="<?= $img_url; ?>">
<?php
}
I have to print the image url which is in low resolution array .
$instagram_feed_data = json_decode($mediacount, true);
Passing a true value to the second parameter of json_decode() tells PHP that you want an array back instead of an object. So you can't dereference it with the object handle like this:
foreach ($instagram_feed_data->data as $item) {
You want an array reference like this:
foreach ($instagram_feed_data['data'] as $item) {

Podio api - how to set category field when create item

I am using php wrapper, try create an item, all is ok, item is creating, but I can't change status, tried different ways, but can't find right way.
Need change status to "Closed" - http://prntscr.com/fsrwc3
Codes not works:
$fields = new PodioItemFieldCollection([
new PodioCategoryItemField(['external_id'=>'status', 'values'=>13]),
]);
$item = new PodioItem([
'app' => new PodioApp($app_id),
'fields' => $fields
]);
$item->save();
or
$fields = new PodioItemFieldCollection([
new PodioCategoryItemField(['external_id'=>'status', 'values'=>13]),
]);
$item = new PodioItem([
'app' => new PodioApp($app_id),
'fields' => $fields
]);
$item->save();
$get_item = PodioItem::get_basic($item->item_id);
$get_item->fields['status']->values = ['id'=>13];
$get_item->save();
After create item (after new PodioItem...), if I get fields after this code (just get $item->fields or PodioItem::get_basic...), I can see correct status, only in the code, only immediatly after create item, but if I get this item in the another code (just PodioItem::get_basic...) I will see default value, so code don't change status, looks like I just see some cache.
If I create item on the one script:
$fields = new PodioItemFieldCollection([
new PodioCategoryItemField(['external_id'=>'status', 'values'=>13]),
]);
$item = new PodioItem([
'app' => new PodioApp($app_id),
'fields' => $fields
]);
$item->save();
Then, in the another script update field, it will be change:
$get_item = PodioItem::get_basic('639637317');
$get_item->fields['status']->values = ['id'=>13];
$get_item->save();
Update - debug information:
Get log by test code -
PodioItem::create($app_id, ['fields' => ['status'=>[13], 'category'=>[3], 'contract-type'=>[4]]]);
(simple variant for creating an item, have the same problems like new PodioItem... )
All fields have category type, but:
status - have inline show type - don't chnages
category - have dropdown show type - Is changing
contract-type - have dropdown show type - Is changing
Log:
2017-07-08 11:07:22 200 POST /item/app/12152727/
2017-07-08 11:07:22 Request body: {"fields":{"status":[8],"category":[3],"contract-type":[4]}}
2017-07-08 11:07:22 Reponse: {
"presence": {
"ref_type": "item",
"ref_id": 641331142,
"user_id": 4194774,
"signature": "c165b85090e6ad28e74ae4baf93ee56113f88bc9"
},
"app": {
"status": "active",
"sharefile_vault_url": null,
"name": "Projects",
"default_view_id": null,
"url_add": "https:\/\/podio.com\/acs-1com\/project-management\/apps\/projects\/items\/new",
"icon_id": 378,
"link_add": "https:\/\/podio.com\/acs-1com\/project-management\/apps\/projects\/items\/new",
"app_id": 12152727,
"current_revision": 141,
"item_name": "Project",
"link": "https:\/\/podio.com\/acs-1com\/project-management\/apps\/projects",
"url": "https:\/\/podio.com\/acs-1com\/project-management\/apps\/projects",
"url_label": "projects",
"config": {
"item_name": "Project",
"icon_id": 378,
"type": "standard",
"name": "Projects",
"icon": "378.png"
},
"space_id": 3466816,
"icon": "378.png"
},
"created_on": "2017-07-10 15:31:16",
"last_event_on": "2017-07-10 15:31:16",
"linked_account_data": null,
"sharefile_vault_folder_id": null,
"app_item_id_formatted": "3988",
"recurrence": null,
"title": "ACSC",
"participants": {},
"created_by": {
"user_id": 4194774,
"name": "Anton Mikhailov",
"url": "https:\/\/podio.com\/users\/4194774",
"type": "user",
"image": null,
"avatar_type": "file",
"avatar": null,
"id": 4194774,
"avatar_id": null,
"last_seen_on": "2017-07-10 15:31:15"
},
"priority": 641331142.0,
"created_via": {
"url": null,
"auth_client_id": 25162,
"display": true,
"name": "importer",
"id": 25162
},
"subscribed_count": 1,
"reminder": null,
"ref": null,
"revision": 0,
"app_item_id": 3988,
"link": "https:\/\/podio.com\/acs-1com\/project-management\/apps\/projects\/items\/3988",
"item_id": 641331142,
"sharefile_vault_url": null,
"rights": ["subscribe", "grant", "add_conversation", "rate", "update", "delete", "add_file", "grant_view", "view", "comment", "add_task"],
"fields": [{
"status": "active",
"type": "category",
"field_id": 93352415,
"label": "Division",
"values": [{
"value": {
"status": "active",
"text": "ACSC",
"id": 3,
"color": "D2E4EB"
}
}],
"config": {
"default_value": null,
"unique": false,
"description": null,
"hidden_create_view_edit": false,
"required": true,
"mapping": null,
"label": "Division",
"visible": true,
"delta": 5,
"hidden": false,
"settings": {
"multiple": false,
"options": [{
"status": "active",
"text": "ACSE",
"id": 1,
"color": "DCEBD8"
}, {
"status": "active",
"text": "ACSB",
"id": 2,
"color": "F7F0C5"
}, {
"status": "active",
"text": "ACSC",
"id": 3,
"color": "D2E4EB"
}],
"display": "dropdown"
}
},
"external_id": "category"
}, {
"status": "active",
"type": "category",
"field_id": 148215928,
"label": "Contract Type",
"values": [{
"value": {
"status": "active",
"text": "No Contract",
"id": 4,
"color": "DDDDDD"
}
}],
"config": {
"default_value": null,
"unique": false,
"description": null,
"hidden_create_view_edit": false,
"required": true,
"mapping": null,
"label": "Contract Type",
"visible": true,
"delta": 7,
"hidden": false,
"settings": {
"multiple": false,
"options": [{
"status": "active",
"text": "PO \/ Purchase \/ T&M",
"id": 1,
"color": "FFD5C2"
}, {
"status": "active",
"text": "Original Contract",
"id": 2,
"color": "D2E4EB"
}, {
"status": "active",
"text": "Service Rider",
"id": 3,
"color": "DCEBD8"
}, {
"status": "active",
"text": "No Contract",
"id": 4,
"color": "DDDDDD"
}],
"display": "dropdown"
}
},
"external_id": "contract-type"
}, {
"status": "active",
"type": "category",
"field_id": 93034840,
"label": "Instal Status",
"values": [{
"value": {
"status": "active",
"text": "Closed",
"id": 13,
"color": "E1D8ED"
}
}],
"config": {
"default_value": null,
"unique": false,
"description": null,
"hidden_create_view_edit": false,
"required": true,
"mapping": null,
"label": "Instal Status",
"visible": true,
"delta": 13,
"hidden": false,
"settings": {
"multiple": false,
"options": [{
"status": "deleted",
"text": "To Be Reviewed",
"id": 2,
"color": "F7F0C5"
}, {
"status": "deleted",
"text": "ACS Accounting Review",
"id": 5,
"color": "FFD5C2"
}, {
"status": "deleted",
"text": "Ignite Setup",
"id": 10,
"color": "DCEBD8"
}, {
"status": "active",
"text": "To Be Scheduled",
"id": 8,
"color": "D2E4EB"
}, {
"status": "active",
"text": "In Progress",
"id": 6,
"color": "DCEBD8"
}, {
"status": "active",
"text": "Warranty",
"id": 11,
"color": "F7F0C5"
}, {
"status": "active",
"text": "Complete",
"id": 3,
"color": "D1F3EC"
}, {
"status": "deleted",
"text": "Closed",
"id": 7,
"color": "DDDDDD"
}, {
"status": "active",
"text": "Cancelled",
"id": 9,
"color": "DDDDDD"
}, {
"status": "deleted",
"text": "VA in Progress",
"id": 4,
"color": "E1D8ED"
}, {
"status": "deleted",
"text": "Submitted",
"id": 1,
"color": "F7F0C5"
}, {
"status": "active",
"text": "On Hold",
"id": 12,
"color": "F7D1D0"
}, {
"status": "active",
"text": "Closed",
"id": 13,
"color": "E1D8ED"
}],
"display": "inline"
}
},
"external_id": "status"
}],
"initial_revision": {
"item_revision_id": 1664054437,
"created_via": {
"url": null,
"auth_client_id": 25162,
"display": true,
"name": "importer",
"id": 25162
},
"created_by": {
"user_id": 4194774,
"name": "Anton Mikhailov",
"url": "https:\/\/podio.com\/users\/4194774",
"type": "user",
"image": null,
"avatar_type": "file",
"avatar": null,
"id": 4194774,
"avatar_id": null,
"last_seen_on": "2017-07-10 15:31:15"
},
"created_on": "2017-07-10 15:31:16",
"user": {
"user_id": 4194774,
"name": "Anton Mikhailov",
"url": "https:\/\/podio.com\/users\/4194774",
"type": "user",
"image": null,
"avatar_type": "file",
"avatar": null,
"id": 4194774,
"avatar_id": null,
"last_seen_on": "2017-07-10 15:31:15"
},
"type": "creation",
"revision": 0
},
"current_revision": {
"item_revision_id": 1664054437,
"created_via": {
"url": null,
"auth_client_id": 25162,
"display": true,
"name": "importer",
"id": 25162
},
"created_by": {
"user_id": 4194774,
"name": "Anton Mikhailov",
"url": "https:\/\/podio.com\/users\/4194774",
"type": "user",
"image": null,
"avatar_type": "file",
"avatar": null,
"id": 4194774,
"avatar_id": null,
"last_seen_on": "2017-07-10 15:31:15"
},
"created_on": "2017-07-10 15:31:16",
"user": {
"user_id": 4194774,
"name": "Anton Mikhailov",
"url": "https:\/\/podio.com\/users\/4194774",
"type": "user",
"image": null,
"avatar_type": "file",
"avatar": null,
"id": 4194774,
"avatar_id": null,
"last_seen_on": "2017-07-10 15:31:15"
},
"type": "creation",
"revision": 0
},
"linked_account_id": null,
"push": {
"timestamp": 1499700676,
"expires_in": 21600,
"channel": "\/item\/641331142",
"signature": "b8a816ff367da6bc730071c875ca3fdca2d2c344"
},
"external_id": null
}
Have you tried http://podio.github.io/podio-php/fields/#category-field ?
Setting values
Set a single value by using the option_id. You can also
add a value with add_value()
$item = PodioItem::get_basic(123);
$field_id = 'category';
// Set value to a single option
$item->fields[$field_id]->values = 4; // option_id=4
// Add value to existing selection
$item->fields[$field_id]->add_value(4); // option_id=4
Use an array to set multiple values
$item = PodioItem::get_basic(123);
$field_id = 'category';
$item->fields[$field_id]->values = array(4,5,6); // option_ids: 4, 5 and 6
Creating item with value:
$fields = new PodioItemFieldCollection([
new PodioCategoryItemField(['external_id'=>'status', 'values'=>array(13)]),
]);
$item = new PodioItem([
'app' => new PodioApp($app_id),
'fields' => $fields
]);
$item->save();

Laravel json response from Controller and use Ajax to render in the View

Im working with Laravel 5.1 and have a small issue.
I am sending a JSON response from Instagram's API for most popular media from my controller and want to grab that response in my view with ajax and show it on page to the user without loading the entire page.
I am trying to grab the username and display it in my view to the user.
Right now nothing happens and the console does not show anything, it is empty.
This is my code:
CONROLLER:
public function PopularPics(City $city){
try{
$jsonData = $city->getMostPopularPics();
return response()->json($jsonData);
}catch(\Exception $ex){
return $ex->getCode();
}
}
VIEW
<ul id="theData">
</ul>
<script>
$(function(){
$("#JRequest").click(function(e){
e.preventDefault();
$.ajax({
type: "GET",
url: "popular",
dataType:"json",
success:function(items){
$.each(items.data,function(i,item){
console.log(item.user.username);
});
}
});
});
});
</script>
INSTAGRAM JSON
{
"data": [{
"type": "image",
"users_in_photo": [],
"filter": "Gotham",
"tags": [],
"comments": { ... },
"caption": {
"created_time": "1296656006",
"text": "ãã¼ãâ¥ã¢ããªå§ãã¦ä½¿ã£ã¦ã¿ãã(^^)",
"from": {
"username": "cocomiin",
"full_name": "",
"type": "user",
"id": "1127272"
},
"id": "26329105"
},
"likes": {
"count": 35,
"data": [{
"username": "mikeyk",
"full_name": "Kevin S",
"id": "4",
"profile_picture": "..."
}, {...subset of likers...}]
},
"link": "http://instagr.am/p/BV5v_/",
"user": {
"username": "cocomiin",
"full_name": "Cocomiin",
"profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1127272_75sq_1296145633.jpg",
"id": "1127272"
},
"created_time": "1296655883",
"images": {
"low_resolution": {
"url": "http://distillery.s3.amazonaws.com/media/2011/02/01/34d027f155204a1f98dde38649a752ad_6.jpg",
"width": 306,
"height": 306
},
"thumbnail": {
"url": "http://distillery.s3.amazonaws.com/media/2011/02/01/34d027f155204a1f98dde38649a752ad_5.jpg",
"width": 150,
"height": 150
},
"standard_resolution": {
"url": "http://distillery.s3.amazonaws.com/media/2011/02/01/34d027f155204a1f98dde38649a752ad_7.jpg",
"width": 612,
"height": 612
}
},
"id": "22518783",
"location": null
},
{
"type": "video",
"videos": {
"low_resolution": {
"url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_102.mp4",
"width": 480,
"height": 480
},
"standard_resolution": {
"url": "http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_101.mp4",
"width": 640,
"height": 640
},
"users_in_photo": null,
"filter": "Vesper",
"tags": [],
"comments": {
"data": [{
"created_time": "1279332030",
"text": "Love the sign here",
"from": {
"username": "mikeyk",
"full_name": "Mikey Krieger",
"id": "4",
"profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_1242695_75sq_1293915800.jpg"
},
"id": "8"
},
{
"created_time": "1279341004",
"text": "Chilako taco",
"from": {
"username": "kevin",
"full_name": "Kevin S",
"id": "3",
"profile_picture": "..."
},
"id": "3"
}],
"count": 2
},
"caption": null,
"likes": {
"count": 1,
"data": [{
"username": "mikeyk",
"full_name": "Mikeyk",
"id": "4",
"profile_picture": "..."
}]
},
"link": "http://instagr.am/p/D/",
"user": {
"username": "kevin",
"full_name": "Kevin S",
"profile_picture": "...",
"id": "3"
},
"created_time": "1279340983",
"images": {
"low_resolution": {
"url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_6.jpg",
"width": 306,
"height": 306
},
"thumbnail": {
"url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_5.jpg",
"width": 150,
"height": 150
},
"standard_resolution": {
"url": "http://distilleryimage2.ak.instagram.com/11f75f1cd9cc11e2a0fd22000aa8039a_7.jpg",
"width": 612,
"height": 612
}
},
"id": "3",
"location": null
},
...]
}

php json_decode returns null even for utf-8 string with no spaces or other special characters

My json_decode returns null and I think I have tried everything before making this post. Please advise me.
I use Windows Live REST API to read user albums and then photos. json_decode works great to decode the response from all other Windows live end points but not from this one :(...
$albums_url = "https://apis.live.net/v5.0/".$albumId."/photos?access_token=" . urlencode($accessToken);
$agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)";
$ch = curl_init($albums_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt ($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_REFERER, "my web site domain name here");
curl_setopt($ch, CURLOPT_ENCODING, 'UTF-8');
$albumPhotosResponse=curl_exec($ch);
curl_close($ch);
When json response arrives it contains lots of \r and \n in it. Even between lines. So I get clean all of it out.
1.I trim it
$albumPhotosResponse = trim($albumPhotosResponse);
2.Remove all \n and \r
$albumPhotosResponse = str_replace(array("\n", "\r"),"",$albumPhotosResponse);
3.And just to make sure there are no extra spaces I do this
$albumPhotosResponse = preg_replace('!\s+!', '', $albumPhotosResponse);
I googled around and have found that for many developers the issue was with json value being not UTF-8 encoded. So I have tried this as well.
$photoAlbumsResponse = json_decode(utf8_encode($photoAlbumsResponse),true);
Chrome does display and format received json document properly. This tells me there are no problems with the structure of json document. I can fold and unfold json objects using visual tools. json is correct. But when I try to json_decode() it. It returns null :(
Please advise me how to solve this issue.
Thank you.
Here is JSON document itself:
{
"data": [
{
"id": "file.f6099d461e678395.F6099D461E678395!126",
"from": {
"name": "SergeyKargopolov",
"id": "f6099d461e678395"
},
"name": "IMG_5398_small.jpg",
"description": "",
"parent_id": "folder.f6099d461e678395.F6099D461E678395!125",
"size": 84683,
"comments_count": 0,
"comments_enabled": true,
"tags_count": 0,
"tags_enabled": true,
"picture": "https://public.blu.livefilestore.com/y2mkGF4H0SO63lkIzy-uMOV5AES5ndgqynGmJwWGUOfkmdVsEU80dW2UnbDcF3_EoYpV8oFH6UB_AxnDZ8hmOud_AvdU65BSPJvE8yYfACcWYZyab2cqRo_gk2S851c89Fb/IMG_5398_small.jpg?psid=1",
"source": "https://public.blu.livefilestore.com/y2mcTvD8EbPp9R2oBWP446Jp40SZmDrNQ5Cc1ssIIwTN5f9btKk3NnykeK10-CXBakQ0D4jRz9ugXpJSVerTdZ4JfA9UOkemKB75IDO9pkL4IrvtiDpyTj5dzf4kAGolzkc/IMG_5398_small.jpg?psid=1",
"images": [
{
"height": 800,
"width": 533,
"source": "https://public.blu.livefilestore.com/y2m-fnaGh1zrR0sLanBP0D_wzT4ocJTqKE2A_8rb8n6_U_FlMt8Rp_dhoEuDBE4f1nkG3ApxWndOsrPfxB-phxJ7-4O343mS5I5n67zE2ZbfI2F_a-SJFhlL7_QcXsobhvU/IMG_5398_small.jpg?psid=1",
"type": "normal"
},
{
"height": 176,
"width": 117,
"source": "https://public.blu.livefilestore.com/y2my2M-gI6cZv33A0ueydYDxackIY4w7vqhmxksbZuBddvZXHsPykgivJTio_VlnSP0hOXu8eKRwRXRfnGK6Flk6HLhsFE4XlJjPyhc9pQ9IdSGV3F7JYZQKxZ7Pcp3Y3Cb/IMG_5398_small.jpg?psid=1",
"type": "album"
},
{
"height": 96,
"width": 63,
"source": "https://public.blu.livefilestore.com/y2mkGF4H0SO63lkIzy-uMOV5AES5ndgqynGmJwWGUOfkmdVsEU80dW2UnbDcF3_EoYpV8oFH6UB_AxnDZ8hmOud_AvdU65BSPJvE8yYfACcWYZyab2cqRo_gk2S851c89Fb/IMG_5398_small.jpg?psid=1",
"type": "thumbnail"
},
{
"height": 900,
"width": 600,
"source": "https://public.blu.livefilestore.com/y2mcTvD8EbPp9R2oBWP446Jp40SZmDrNQ5Cc1ssIIwTN5f9btKk3NnykeK10-CXBakQ0D4jRz9ugXpJSVerTdZ4JfA9UOkemKB75IDO9pkL4IrvtiDpyTj5dzf4kAGolzkc/IMG_5398_small.jpg?psid=1",
"type": "full"
}
],
"link": "https://skydrive.live.com/redir.aspx?cid=f6099d461e678395&page=view&resid=F6099D461E678395!126&parid=F6099D461E678395!125",
"when_taken": null,
"height": 900,
"width": 600,
"type": "photo",
"camera_make": null,
"camera_model": null,
"focal_ratio": 0,
"focal_length": 0,
"exposure_numerator": 0,
"exposure_denominator": 0,
"created_time": "2010-07-27T04:19:59+0000",
"updated_time": "2010-07-27T04:20:00+0000"
},
{
"id": "file.f6099d461e678395.F6099D461E678395!131",
"from": {
"name": "SergeyKargopolov",
"id": "f6099d461e678395"
},
"name": "011s769f.jpg",
"description": "",
"parent_id": "folder.f6099d461e678395.F6099D461E678395!125",
"size": 96091,
"comments_count": 0,
"comments_enabled": true,
"tags_count": 0,
"tags_enabled": true,
"picture": "https://public.blu.livefilestore.com/y2m5gYxO0yiumEjjK29fEI7AaLP8kCKmHVSU5UI7XWb-l2z0uZRfCyHBVujSkAQhjjeZHww1sqfLlsg5nY4jUpfkgcTibKw7xc5Qfi3zcHkB22BmG-gMyZi8xDjM0XXWOdA/011s769f.jpg?psid=1",
"source": "https://public.blu.livefilestore.com/y2mZicAQqNBndn2-DlU0uAh1yK5AgoB2G2zqBnVr2nXVlDgs9nxk441RPuHa8sqUHeCk4cRK6lhfPDi9fcbVRVBlapQ9w_xSh4I86E0v9hE1368sIPGrHEH4pNFqs4CA7Y-/011s769f.jpg?psid=1",
"images": [
{
"height": 800,
"width": 529,
"source": "https://public.blu.livefilestore.com/y2mNp-KCqcEvWN0lYYO129mMIw8AmcCccv9rG8RawrQort6wNapXghZVlxHKLngDwJxo4P-3gdzHSPxlfpKVFgdvQJY_sVC-o3El9k9nkNFpop162qGlEAvooNvlqIAlaPH/011s769f.jpg?psid=1",
"type": "normal"
},
{
"height": 176,
"width": 116,
"source": "https://public.blu.livefilestore.com/y2mJKrnTHXH6yWv4Eb9lMpqDBED7QSVaoc6Fs1PHPtiqijK8iw7A0l2e9gOMvRvG0esCVWQbG3dtUVS1r0nXjabjG1xikqc586nf2GBeNMmSZYRDWa143yRLUkU5uldZ7ko/011s769f.jpg?psid=1",
"type": "album"
},
{
"height": 96,
"width": 63,
"source": "https://public.blu.livefilestore.com/y2m5gYxO0yiumEjjK29fEI7AaLP8kCKmHVSU5UI7XWb-l2z0uZRfCyHBVujSkAQhjjeZHww1sqfLlsg5nY4jUpfkgcTibKw7xc5Qfi3zcHkB22BmG-gMyZi8xDjM0XXWOdA/011s769f.jpg?psid=1",
"type": "thumbnail"
},
{
"height": 1024,
"width": 678,
"source": "https://public.blu.livefilestore.com/y2mZicAQqNBndn2-DlU0uAh1yK5AgoB2G2zqBnVr2nXVlDgs9nxk441RPuHa8sqUHeCk4cRK6lhfPDi9fcbVRVBlapQ9w_xSh4I86E0v9hE1368sIPGrHEH4pNFqs4CA7Y-/011s769f.jpg?psid=1",
"type": "full"
}
],
"link": "https://skydrive.live.com/redir.aspx?cid=f6099d461e678395&page=view&resid=F6099D461E678395!131&parid=F6099D461E678395!125",
"when_taken": "2010-10-30T12:08:10+0000",
"height": 1024,
"width": 678,
"type": "photo",
"camera_make": null,
"camera_model": null,
"focal_ratio": 0,
"focal_length": 0,
"exposure_numerator": 0,
"exposure_denominator": 0,
"created_time": "2010-11-10T21:34:19+0000",
"updated_time": "2010-11-12T21:27:17+0000"
},
{
"id": "file.f6099d461e678395.F6099D461E678395!132",
"from": {
"name": "SergeyKargopolov",
"id": "f6099d461e678395"
},
"name": "0111facs.jpg",
"description": "",
"parent_id": "folder.f6099d461e678395.F6099D461E678395!125",
"size": 103077,
"comments_count": 0,
"comments_enabled": true,
"tags_count": 0,
"tags_enabled": true,
"picture": "https://public.blu.livefilestore.com/y2m6gsOPgubuCzBpTvBOfyuYUiY33ToLDcl1J7IFPTkSBCdtd7AxIgdTr22k0LXoqhwzL3d7ZPESa3umbHHp37gNCEyoygH8WXnxOnNWW1xt_huFbcu1Au8kl5eF_bhvM-I/0111facs.jpg?psid=1",
"source": "https://public.blu.livefilestore.com/y2m3qQ0ew5NYVPazHoNNYlSdZszzzJCIVmH-6pSBwAAhmsruUq6BmciwF2Hnxv7h7fv2jdjPqPWKjs6AQ-_NuQrW2CnFMJ27k6A_DULXRwhr1K-fZr2LN0xLiIAocHL9gtk/0111facs.jpg?psid=1",
"images": [
{
"height": 540,
"width": 800,
"source": "https://public.blu.livefilestore.com/y2mfTbhvgI9mawwJUXWqzPWFLUDfwmBECiF7OYMXV5etprNG7gre5i7FQSQTZ3r8Oe9MfsmUKK40-EQLTOUlUHGuRz4Es1b_stSXuHIYDwJYeJ-AvcDe4SLFhx5G7lYacV1/0111facs.jpg?psid=1",
"type": "normal"
},
{
"height": 118,
"width": 176,
"source": "https://public.blu.livefilestore.com/y2m0vrDF8_R1FoZcEmgwBpkWcPWu902jJLlKzGOv4R4UIQvMHbSHNbLLAyUrKJagbHypqxZeUaQpwJXayLUxCExKEzsWBF0pD0_pWNDfk9NmfDlB_dtU3y0PlNIIATuSoTC/0111facs.jpg?psid=1",
"type": "album"
},
{
"height": 64,
"width": 96,
"source": "https://public.blu.livefilestore.com/y2m6gsOPgubuCzBpTvBOfyuYUiY33ToLDcl1J7IFPTkSBCdtd7AxIgdTr22k0LXoqhwzL3d7ZPESa3umbHHp37gNCEyoygH8WXnxOnNWW1xt_huFbcu1Au8kl5eF_bhvM-I/0111facs.jpg?psid=1",
"type": "thumbnail"
},
{
"height": 608,
"width": 900,
"source": "https://public.blu.livefilestore.com/y2m3qQ0ew5NYVPazHoNNYlSdZszzzJCIVmH-6pSBwAAhmsruUq6BmciwF2Hnxv7h7fv2jdjPqPWKjs6AQ-_NuQrW2CnFMJ27k6A_DULXRwhr1K-fZr2LN0xLiIAocHL9gtk/0111facs.jpg?psid=1",
"type": "full"
}
],
"link": "https://skydrive.live.com/redir.aspx?cid=f6099d461e678395&page=view&resid=F6099D461E678395!132&parid=F6099D461E678395!125",
"when_taken": null,
"height": 608,
"width": 900,
"type": "photo",
"camera_make": null,
"camera_model": null,
"focal_ratio": 0,
"focal_length": 0,
"exposure_numerator": 0,
"exposure_denominator": 0,
"created_time": "2010-11-10T21:34:21+0000",
"updated_time": "2010-11-10T21:34:21+0000"
},
{
"id": "file.f6099d461e678395.F6099D461E678395!133",
"from": {
"name": "SergeyKargopolov",
"id": "f6099d461e678395"
},
"name": "0111tcez.jpg",
"description": "",
"parent_id": "folder.f6099d461e678395.F6099D461E678395!125",
"size": 92916,
"comments_count": 0,
"comments_enabled": true,
"tags_count": 0,
"tags_enabled": true,
"picture": "https://public.blu.livefilestore.com/y2m1cj77LH9hzorTOA0jZ16Np2J5-Ut9_9VwZKQ-Er9lXfDcgc6iF1gfQzVEzgLIEqd5Q_gxKAdyJFil3JB9G7ku6eMJZCplG6dz1UQcU4IkwIrI_U8f8y04Hyy_Dj2oTy2/0111tcez.jpg?psid=1",
"source": "https://public.blu.livefilestore.com/y2mqv57qXM8TmrOqmJVkPohDxtApxRsWRIuzQYDd2JT_8KbO5bv72yUE_UVX-Z5-xA0eSYXqz2x42s314MOq8xc7lyi7cuaFNgEV1KupIfJ8R0K5xF1xRwdVxL4b010c8r-/0111tcez.jpg?psid=1",
"images": [
{
"height": 800,
"width": 554,
"source": "https://public.blu.livefilestore.com/y2mdRIJj3A6tNLVr6cXwGRJZeDDbkI78YEujBv_i5UmBCoLYnqBm2Iv06W_KlZIXNeBKby3Z1y_Oeb2tVUTmt4gBA/0111tcez.jpg?psid=1&ck=16&ex=720",
"type": "normal"
},
{
"height": 176,
"width": 121,
"source": "https://public.blu.livefilestore.com/y2mjb6q9PCcQuUEG8qDNw8wri6Slsj5SjiQz7qJuk235sNX7a0z0WcW25X2Q11dcSrJsssTWtDYZgq6hKFlon3SDxKELEnThqN0Xq5y6Ia7XgPHiTiLQngjRaXiKCpHfhQu/0111tcez.jpg?psid=1",
"type": "album"
},
{
"height": 96,
"width": 66,
"source": "https://public.blu.livefilestore.com/y2m1cj77LH9hzorTOA0jZ16Np2J5-Ut9_9VwZKQ-Er9lXfDcgc6iF1gfQzVEzgLIEqd5Q_gxKAdyJFil3JB9G7ku6eMJZCplG6dz1UQcU4IkwIrI_U8f8y04Hyy_Dj2oTy2/0111tcez.jpg?psid=1",
"type": "thumbnail"
},
{
"height": 900,
"width": 624,
"source": "https://public.blu.livefilestore.com/y2mqv57qXM8TmrOqmJVkPohDxtApxRsWRIuzQYDd2JT_8KbO5bv72yUE_UVX-Z5-xA0eSYXqz2x42s314MOq8xc7lyi7cuaFNgEV1KupIfJ8R0K5xF1xRwdVxL4b010c8r-/0111tcez.jpg?psid=1",
"type": "full"
}
],
"link": "https://skydrive.live.com/redir.aspx?cid=f6099d461e678395&page=view&resid=F6099D461E678395!133&parid=F6099D461E678395!125",
"when_taken": null,
"height": 900,
"width": 624,
"type": "photo",
"camera_make": null,
"camera_model": null,
"focal_ratio": 0,
"focal_length": 0,
"exposure_numerator": 0,
"exposure_denominator": 0,
"created_time": "2010-11-10T21:34:21+0000",
"updated_time": "2010-11-10T21:34:22+0000"
},
{
"id": "file.f6099d461e678395.F6099D461E678395!142",
"from": {
"name": "SergeyKargopolov",
"id": "f6099d461e678395"
},
"name": "011xfx15.jpg",
"description": "ALLURE/",
"parent_id": "folder.f6099d461e678395.F6099D461E678395!125",
"size": 183605,
"comments_count": 0,
"comments_enabled": true,
"tags_count": 0,
"tags_enabled": true,
"picture": "https://public.blu.livefilestore.com/y2mnESJYaEhmj46Iq_sDjjZVgrs8636E_DuHdGHMVEJh558hgoc1KzIwGjckWLRhieCuG_wpq2KZ0EYQxkONF3Pe3ID5eCz2IiVOlrFp4p2U1hC1jQ4-z-DQ3hragV2otEg/011xfx15.jpg?psid=1",
"source": "https://public.blu.livefilestore.com/y2mNGQLRETzgJSL4go-5FJ2rtDayq-rOCcD5CphPiSLoXZNn1t_w3uGr-mVMvuhVdJVIFrBLtvKL-wXFc7Pwk5MMCHJwZsZ0t_xOVXLXKq6eSfjYanu0xnCuvnFwB1H5bwq/011xfx15.jpg?psid=1",
"images": [
{
"height": 496,
"width": 800,
"source": "https://public.blu.livefilestore.com/y2muc04ASn8PnEpsbLKR1t85o7ehGUQg5Q5ZMkjvQ14wPqrS-ycSGnSa-ujmrtB9JRSGBx_BlE3E36EfZmRrkQd9g/011xfx15.jpg?psid=1&ck=16&ex=720",
"type": "normal"
},
{
"height": 108,
"width": 176,
"source": "https://public.blu.livefilestore.com/y2mnJNZVApUSdeKRGH6TDT4BJ_eNmHeVKhcdZUsjFyaQAXzL-CkAaiSADroRCylRVMf7u7iFv6wse7CPhc6ijZMwSX5eGEZntFzFHPvZyVIpcd1U-nmW8_ckzFIPFmhd2NW/011xfx15.jpg?psid=1",
"type": "album"
},
{
"height": 58,
"width": 96,
"source": "https://public.blu.livefilestore.com/y2mnESJYaEhmj46Iq_sDjjZVgrs8636E_DuHdGHMVEJh558hgoc1KzIwGjckWLRhieCuG_wpq2KZ0EYQxkONF3Pe3ID5eCz2IiVOlrFp4p2U1hC1jQ4-z-DQ3hragV2otEg/011xfx15.jpg?psid=1",
"type": "thumbnail"
},
{
"height": 682,
"width": 1100,
"source": "https://public.blu.livefilestore.com/y2mNGQLRETzgJSL4go-5FJ2rtDayq-rOCcD5CphPiSLoXZNn1t_w3uGr-mVMvuhVdJVIFrBLtvKL-wXFc7Pwk5MMCHJwZsZ0t_xOVXLXKq6eSfjYanu0xnCuvnFwB1H5bwq/011xfx15.jpg?psid=1",
"type": "full"
}
],
"link": "https://skydrive.live.com/redir.aspx?cid=f6099d461e678395&page=view&resid=F6099D461E678395!142&parid=F6099D461E678395!125",
"when_taken": "2010-11-11T21:07:02+0000",
"height": 682,
"width": 1100,
"type": "photo",
"camera_make": null,
"camera_model": null,
"focal_ratio": 0,
"focal_length": 0,
"exposure_numerator": 0,
"exposure_denominator": 0,
"created_time": "2010-11-15T21:48:22+0000",
"updated_time": "2010-11-15T21:48:23+0000"
}
]
}

Categories