dborn;301047 Wrote: > SuperDateTime also uses asynchttp Daniel hi guys
Here is an Async example.. I think I took it from the AstroInfo plugin :s; sub getSpiceflyData { $url = 'http://whatever'; $http = Slim::Networking::SimpleAsyncHTTP->new(\&gotSpiceflyData,\&gotHTTPError,{caller => 'getSpiceflyData'}); $http->get($url); # get the data blah blah..........do other stuff etc.. ..... sub gotSpiceflyData { #fired when data is received $content = $http->content(); # This is the webpage in one big string. ....... Nice and simple, you need to build two subs, one to cover the fail (gotHTTPError) and another to run once the data has been pulled, in this case gotSpiceflyData. Hope this helps :) -- cparker www.spicefly.com - Visit for an enhanced Interface for MusicIP and tips and tricks for integrating with Slimserver! ------------------------------------------------------------------------ cparker's Profile: http://forums.slimdevices.com/member.php?userid=2083 View this thread: http://forums.slimdevices.com/showthread.php?t=21989 _______________________________________________ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/lists/listinfo/plugins