CodeClerks

Level x seoclerks user list creator in php xml and json formatted.



Write the reason you're deleting this FAQ

Level x seoclerks user list creator in php xml and json formatted.

Hello all, I couldn't help but notice many affiliate stores have level x user lists and struggle to find them all so I made a php script that finds most level x users and formats the output in xml and json.

Simple xml version!

[PHP]$base = 'https://www.seoclerks.com';

function LevelX($amount) {
global $base;
$response = file_get_contents("${base}/api?type=inlinead&ul=4&am=${amount}&f=json");
return json_decode($response, true);
}

$request = LevelX('1000');
$levelx = new SimpleXMLElement('<levelx/>');//Create xml root called levelx!
$Duplicates_array[] = '';
foreach ($request as $data) {
if (!in_array($data['seller_username'], $Duplicates_array)) {
$Duplicates_array[] = $data['seller_username'];

$user = $levelx->addChild('user');//Create children in levelx called user

//Add user attributes / info!
$user->addAttribute('name', $data['seller_username']);
$user->addAttribute('id', $data['seller_userid']);
$user->addAttribute('location', $data['seller_country']);
}
}

Header('Content-type: text/xml');
print($levelx->asXML());[/PHP]

What would output something like below for each user.
<user name="jakemadness" id="79732" "GB"/>

And here is the json version what is much smaller!
[PHP]$base = 'https://www.seoclerks.com';

function LevelX($amount) {
global $base;
$response = file_get_contents("${base}/api?type=inlinead&ul=4&am=${amount}&f=json");
return json_decode($response, true);
}

$request = LevelX('1000');
$user_array[] = '';
foreach ($request as $data) {
if (!in_array($data['seller_username'], $user_array)) {
$user_array[] = $data['seller_username'];
}
}

echo json_encode($user_array);
[/PHP]
what would output something like below.
["jakemadness","hitmeasap","karoshio", . ... .. .

If you would like the result in any other format let me know and I will see what I can do for you Level x seoclerks user list creator in php xml and json formatted.
I hope this helps any affiliate store users Level x seoclerks user list creator in php xml and json formatted.

Comments

Please login or sign up to leave a comment

Join
robertman11
That is awesome, nice work. I think there are plans for a member list, btw.



Are you sure you want to delete this post?

jakemadness
That is awesome, nice work. I think there are plans for a member list, btw.

I'd love to be informed if a member list is created, Then I wouldn't need this anymore Level x seoclerks user list creator in php xml and json formatted.



Are you sure you want to delete this post?

Sean101
I had a list of Level X members on my affiliate store website and had to search for them all manually, after that I ended up creating a thread here on the forum asking for Level X members to reply. Although I no longer have the list on my website, I still appreciate you have come up with something to find them and save a lot of time, so great job! Level x seoclerks user list creator in php xml and json formatted.



Are you sure you want to delete this post?

jakemadness
Smaller Json version. . .
[php]
function ReturnList($ul, $am) {
$api = "https://www.seoclerks.com/api?type=inlinead&ul={$ul}&am={$am}&f=json";
$data = json_decode(file_get_contents($api), true);

foreach ($data as $user) {
$users[$user['seller_username']] = array(
"user_location" => $user['seller_country'],
"user_id" => $user['seller_userid'],
"user_level" => $user['seller_userlevel']
);
}

array_unique($users);
return json_encode($users);
}


header('Content-Type: application/json');
print ReturnList('4', '20000');
[/php]



Are you sure you want to delete this post?