aboutsummaryrefslogtreecommitdiffstats
path: root/include/Scrape.php
diff options
context:
space:
mode:
authorVasudev Kamath <kamathvasudev@gmail.com>2012-06-23 08:11:35 +0530
committerVasudev Kamath <kamathvasudev@gmail.com>2012-06-23 08:11:35 +0530
commit6e4760dd9c512147309b5e4a98d25216610f81da (patch)
treecd1ea2edf6b257e52ab8fd10c781ba600d884506 /include/Scrape.php
parent11974b4d948ae5d9b9fb53970838463bd88bb9f6 (diff)
parent4e7eb36dd1e65bf481ffe30614565674cbef4fe5 (diff)
downloadvolse-hubzilla-6e4760dd9c512147309b5e4a98d25216610f81da.tar.gz
volse-hubzilla-6e4760dd9c512147309b5e4a98d25216610f81da.tar.bz2
volse-hubzilla-6e4760dd9c512147309b5e4a98d25216610f81da.zip
Merge branch 'master' of git://github.com/friendica/friendica
Diffstat (limited to 'include/Scrape.php')
-rw-r--r--include/Scrape.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/Scrape.php b/include/Scrape.php
index ca8f6e83a..4f53effe9 100644
--- a/include/Scrape.php
+++ b/include/Scrape.php
@@ -352,10 +352,11 @@ function probe_url($url, $mode = PROBE_NORMAL) {
$email_conversant = false;
$twitter = ((strpos($url,'twitter.com') !== false) ? true : false);
+ $lastfm = ((strpos($url,'last.fm/user') !== false) ? true : false);
$at_addr = ((strpos($url,'@') !== false) ? true : false);
- if(! $twitter) {
+ if((! $twitter) && (! $lastfm)) {
if(strpos($url,'mailto:') !== false && $at_addr) {
$url = str_replace('mailto:','',$url);
@@ -564,6 +565,14 @@ function probe_url($url, $mode = PROBE_NORMAL) {
$vcard['fn'] = $tid . '@twitter';
}
+ if($lastfm) {
+ $profile = $url;
+ $poll = str_replace(array('www.','last.fm/'),array('','ws.audioscrobbler.com/1.0/'),$url) . '/recenttracks.rss';
+ $vcard['nick'] = basename($url);
+ $vcard['fn'] = $vcard['nick'] . t(' on Last.fm');
+ $network = NETWORK_FEED;
+ }
+
if(! x($vcard,'fn'))
if(x($vcard,'nick'))
$vcard['fn'] = $vcard['nick'];