aboutsummaryrefslogtreecommitdiffstats
path: root/include/Scrape.php
diff options
context:
space:
mode:
authorZvi ben Yaakov (a.k.a rdc) <coderzvi@infosoc.net>2012-06-21 13:38:14 +0300
committerZvi ben Yaakov (a.k.a rdc) <coderzvi@infosoc.net>2012-06-21 13:38:14 +0300
commit5e3e3915e347e4c298498ce0a8c493b9cd03201b (patch)
tree5a7aabb78964ab82caebac84299015af4f87882d /include/Scrape.php
parentd20cdf09eafbc57c1b6dbcb78a5cdaa731ae876d (diff)
parent53c9ea760659b39deeab9cff5d4f26d5abd63d31 (diff)
downloadvolse-hubzilla-5e3e3915e347e4c298498ce0a8c493b9cd03201b.tar.gz
volse-hubzilla-5e3e3915e347e4c298498ce0a8c493b9cd03201b.tar.bz2
volse-hubzilla-5e3e3915e347e4c298498ce0a8c493b9cd03201b.zip
Merge 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'];