mirror of
https://github.com/gamaio/UnPS-API.git
synced 2024-12-22 02:02:40 +00:00
c649fa6030
There's an error somewhere
52 lines
994 B
PHP
52 lines
994 B
PHP
<?php
|
|
|
|
echo "JSON TESTING...<br />\n";
|
|
$apikey = '580658027';
|
|
|
|
$link = "http://localhost/phpmyadmin";
|
|
$linkid = '5432';
|
|
$username = "dc0de";
|
|
$password = "password123";
|
|
$tags = "Testing password json";
|
|
$comment = "This is a test of JSON";
|
|
$email = "tehfoxy.c0de@gmail.com";
|
|
$appname = "JSON TEST";
|
|
$imgdata = "This is a double array containing multipart/formdata image upload";
|
|
|
|
include('dbsettings.php');
|
|
include('json.api.backend.php');
|
|
$api = new api();
|
|
|
|
$databases = array(
|
|
'a' => $apidb,
|
|
's' => $shortdb,
|
|
'i' => $imgdb,
|
|
'u' => $udb
|
|
);
|
|
|
|
$data = array(
|
|
'link' => $link,
|
|
'linkid' => $linkid,
|
|
'username' => $username,
|
|
'password' => $password,
|
|
'tags' => $tags,
|
|
'comment' => $comment,
|
|
'email' => $email,
|
|
'appname' => $appname,
|
|
'imgdata' => $imgdata
|
|
);
|
|
|
|
$command = array(
|
|
'db' => $databases,
|
|
'key' => $apikey,
|
|
'data' => $data
|
|
);
|
|
|
|
$json = json_encode($command);
|
|
|
|
//echo $api->shorten($json);
|
|
|
|
var_dump(json_decode($json, true));
|
|
|
|
|
|
?>
|