Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Imran Hussain
sucs-site
Commits
b552813a
Commit
b552813a
authored
Oct 04, 2015
by
Imran Hussain
Browse files
Start of the new php file for the suapiv2 fucntions and shit,
parent
d1734db3
Changes
1
Hide whitespace changes
Inline
Side-by-side
components/suapiv2.php
0 → 100644
View file @
b552813a
<?php
// sorry
error_reporting
(
E_ALL
);
ini_set
(
'display_errors'
,
1
);
$apibaseurl
=
"http://su-apiv2.sucs.org/?apikey=wibble&orgid=6613"
;
$ch
=
curl_init
(
$apibaseurl
);
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
TRUE
);
$raw_data
=
curl_exec
(
$ch
);
$formated_raw_data
=
json_decode
(
$raw_data
,
true
);
$membership_data
=
$formated_raw_data
[
"table1"
][
"table1_Product_Collection"
][
"table1_Product"
];
$just_members
=
array
();
foreach
(
$membership_data
as
$typeOfMember
)
{
foreach
(
$typeOfMember
[
"Detail_Collection"
][
"Detail"
]
as
$member
)
{
array_push
(
$just_members
,
$member
[
"@attributes"
]);
}
}
function
check_SU_trans
(
$sid
,
$transid
)
{
global
$just_members
;
var_dump
(
$just_members
);
}
check_SU_trans
(
"786857"
,
"30163352"
);
?>
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment