YOUAREtehSCENE Posted June 27, 2010 Share Posted June 27, 2010 I'm trying to add a little code to my website I run so that it will show users a list of bands that they met like. instead of writing out long hand for fans of: I just recently downloaded this. http://www.matto1990.com/projects/phplastfmapi/ It has the files that I need to run this api, or php script or code. Inside, the folder it has examples lastfmapi sample_applications changelog license readme I'm reading on how to write code, I'm brand new to this. and I"m having trouble, I have my secret key, and api key. http://www.last.fm/api/auth?api_key=39246ccfee835966b1f181d0b47xxxx I can get my token, or session going cause i have it to shoot to my website youarethescene.net Now, i'm reading this on how to build I guess a class http://sourceforge.net/apps/mediawiki/phplastfmapi/index.php?title=Usage#Step_1:_Download Now, I'm sort of confused cause some of the php files that were in the file I downloaded $authVars = array( 'apiKey' => 39246ccfee835966b1f181d0b47 trim(fgets($file)), 'secret' => 8731edb71db292fc52618451 trim(fgets($file)), 'username' => YouAreTeHScene, 'sessionKey' => trim(fgets($file)), 'subscriber' => trim(fgets($file)) Now, do I put my api key there and secret key and my last.fm user name. Do, I get rid of the "trim(fgets($file))" or put the info next to it "trim(fgets($file))", or replace "trim(fgets($file))" with the info I need.?? It would be easier if someone just did this for me but yeah I know nobody wants to help out. but, the way I have it now i'm getting Parse error: syntax error, unexpected T_STRING, expecting ')' in /home/yats/youarethescene.net/lastfmapi/artist.getsimilar/index.php on line 10 I dont know if Im doing it correctly or what Im really new to this so I'm all over this http://www.last.fm/api/webauth http://www.last.fm/api/account got my own account with the API key, and secret key trying to figure where to put it Pretty much, I'd like it to do is lets say I'm sure you guys have heard of this band I HOPE SO Blink182 under that It will show a small cd artwork if the band has it of certain other bands that people might enjoy if they like blink182 I pretty much would like to have on my wordpress site under a post I make it would be <div id="review"> They'z da shit man. </div> <div id="related_bands> You may also like: <ul> <li>Greenday</li> <li>Lady Gaga</li> <li>Chumbawumba</li> <li>The Spice Girls</li> </ul> Information Provided By <a href="http://last.fm">Last.fm</a> </div> <div id="comments"> Blah random comment things here like on a blog. </div> Link to comment https://forums.phpfreaks.com/topic/205971-phpapi-lastfm-pulling-artistgetsimilar/ Share on other sites More sharing options...
YOUAREtehSCENE Posted June 28, 2010 Author Share Posted June 28, 2010 Something like this, that will keep the same band list Link to comment https://forums.phpfreaks.com/topic/205971-phpapi-lastfm-pulling-artistgetsimilar/#findComment-1078461 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.