Results 1 to 3 of 3
Hybrid View
-
12th Apr 2012, 11:00 AM #1OPMemberWebsite's:
UmNotaBlogger.comawesome! thanks!
I found another way myself:
PHP Code:<?php
function sortByOneKey(array $array, $key, $asc = true) {
$result = array();
$values = array();
foreach ($array as $id => $value) {
$values[$id] = isset($value[$key]) ? $value[$key] : '';
}
if ($asc) {
asort($values);
}
else {
arsort($values);
}
foreach ($values as $key => $value) {
$result[$key] = $array[$key];
}
return $result;
}
$loadxml_folder_info = simplexml_load_file('http://www.mediafire.com/api/folder/get_info.php?folder_key=wl7j50kmccaci');
$max = $loadxml_folder_info->folder_info->file_count;
$output = '';
$array = array();
for ($i = 0; $i < $max; $i++) {
foreach($loadxml_folder_info->folder_info->files->file[$i]->quickkey as $mf_quickkey){
$subarray = array();
$subarray['key'] = (string)$loadxml_folder_info->folder_info->files->file[$i]->quickkey;
$subarray['name'] = (string)$loadxml_folder_info->folder_info->files->file[$i]->filename;
}
$array[] = $subarray;
}
$sortedByNameAsc = sortByOneKey($array, 'name');
?>Mr. Goodie2Shoes Reviewed by Mr. Goodie2Shoes on . MediaFire API: want to sort... Hello again, I am using MediaFire's API to share my stuff... I just post the folder link and the files are automatically parsed... and this is the code snippet that I use (including an example): <?php $loadxml_folder_info = simplexml_load_file('http://www.mediafire.com/api/folder/get_info.php?folder_key=wl7j50kmccaci'); $max = $loadxml_folder_info->folder_info->file_count; $output = ''; for ($i = 0; $i < $max; $i++) { $mf_url_link = Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
LulzImg API (sort of) Upload Example
By Lifetalk in forum Web Development AreaReplies: 4Last Post: 10th Dec 2011, 02:59 PM -
Sort Thread By...
By itsHERO in forum vBulletinReplies: 1Last Post: 20th Oct 2011, 05:47 PM -
How to create some sort of database? (Not SQL or something)
By Dark-BlaZe in forum vBulletinReplies: 2Last Post: 21st Jul 2010, 08:02 PM -
How to sort MegaUpload links with RapidLeech?
By MadK in forum Technical Help Desk SupportReplies: 10Last Post: 27th May 2010, 08:39 AM -
[phpBB2] How to sort this?
By pi0tr3k in forum phpBBReplies: 8Last Post: 2nd Apr 2010, 03:24 PM
themaCreator - create posts from...
Version 3.48 released. Open older version (or...