i'm trying to put the permalink into this php code:
<?php
$url = "http://blabla.com";
$allowedDomains = array
(
'rapidshare',
'megaupload',
'depositfiles',
'letitbit',
'hotfile',
'sherebee',
'filefactory',
'zshare',
'sendspace',
'uploadbox',
'uploading',
'4shared',
'gigasize',
'mediafire',
'netload',
'linksave',
'filehoster',
'rghost',
'protector'
);
$page = file_get_contents($url);
preg_match_all("/<a.*?href=(\"|\')(.*?)\\1.*?>.*?<\/a>/is", $page, $matches);
echo "<pre>";
//print_r($matches);
echo "<pre>";
echo "Download Links:";
echo "<ul> ";
foreach ($matches[2] as $match)
{
$validDomain = false;
foreach ($allowedDomains as $domain)
{
if (strpos($match, $domain))
{
$validDomain = true;
break;
}
}
if ($validDomain)
{
echo "<li><a href=\"{$match}\">{$match}</a></li>";
}
}
echo "</ul> ";
?>
and get_the_permalink(); is not working, either...