This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Send HTTP Response Method | |
function sendResponse($status, $body = '') | |
{ | |
$status_header = 'HTTP/1.1 ' . $status; | |
header($status_header); | |
header('Content-type: application/json'); | |
echo $body; | |
} | |
// Calling the HTTP Response Method with parameters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sendResponse($status, $body = '') | |
{ | |
$status_header = 'HTTP/1.1 ' . $status; | |
header($status_header); | |
header('Content-type: application/json'); | |
echo $body; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require "/classes/Database.php"; | |
header("Content-type: text/json"); | |
$dbinfo = array( | |
"host" => "127.0.0.1", | |
"user" => "root", | |
"pass" => "", | |
"name" => "hiskor" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require "/classes/Database.php"; | |
header("Content-type: text/json"); | |
$dbinfo = array( | |
"host" => "127.0.0.1", | |
"user" => "root", | |
"pass" => "", | |
"name" => "hiskor" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSURL *url = [NSURL URLWithString:[receiveItem objectForKey:@"image"]]; | |
NSData *imageData = [NSData dataWithContentsOfURL:url]; | |
UIImage *itemImage = [UIImage imageWithData:imageData]; | |
itemImageView = [[UIImageView alloc] initWithImage:itemImage]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"image_id":"mmwVV74", | |
"hits":"2", | |
"first_view":"1356242044" | |
}, | |
{ | |
"image_id":"jSOxa38", | |
"hits":"5", | |
"first_view":"1356245094" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"first":[ | |
{ | |
"image_id":"vNZYZ08", | |
"hits":"5", | |
"first_view":"1356184026" | |
}, | |
{ | |
"image_id":"j1QZs34", | |
"hits":"6", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "ItemsTableViewController.h" | |
@interface ItemsTableViewController () | |
@end | |
@implementation ItemsTableViewController | |
@synthesize categoryType, image_id, dataJSON; | |
- (id)initWithStyle:(UITableViewStyle)style |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "ResourcesTableViewController.h" | |
@interface ResourcesTableViewController () | |
@end | |
@implementation ResourcesTableViewController | |
@synthesize resourceCategories; | |
- (id)initWithStyle:(UITableViewStyle)style |