I'm looking for someone to help me with this *right now please*. It's a single php file solution that shouldn't take more than an hour to finish. I wrote the algorithm for it, but will also be available on skype to explain and make sure it is clear and understandable.
I would like to do the following:
Connect to [url removed, login to view] API and authenticate
For each user
Connect to database and get list of songs/genres (they are separated by commas). <-- I already have this part working
Retrieve each song/genre from the list with commas and store in variable let's call $musicitem and process it as follows
for each musicitem
call [url removed, login to view] and retrieve name
for each name from [url removed, login to view]:
compare $musicitem to "name"
if equal treat musicitem as a genre
if loop ends and was not equal to any, treat musicitem as artist
if $musicitem is genre
give it count of 100 and store its name and count an array (if $musicitem is a tag that already exists in array add current count to existing count
if $musicitem is artist
call [url removed, login to view] and get top 10 tags based on "count"
store this information in array (if tag already exists in array add current count to existing count)
Now find tag with largest count in array and divide all the array values but that max count value
Then multiply by 100
All tags should now have values of 100 or less now
repeat the same for each user but storing the values in a separate column of the array each time or in a separate array
Now add up the tag values for all the tags and determine the tag with the largest total count