the site is at this page : http://shawn.sc2broadcast.net/test/
and the code i have is:
Code: Select all
<?php
$homepage = file_get_contents('http://www.macsiam.com/sites.php');
echo explode("//", $homepage);
?>Moderator: General Moderators
Code: Select all
<?php
$homepage = file_get_contents('http://www.macsiam.com/sites.php');
echo explode("//", $homepage);
?>Code: Select all
$homepage = file_get_contents('http://www.macsiam.com/sites.php');
preg_match_all('%\'http://([^./]+).[^.]+\.[a-z]{2,4}\'%i', $homepage, $domains, PREG_PATTERN_ORDER);
// $domains[0] is an array of matched full URLs (http://whatever.wherever.com/page.php)
// $domains[1] is an array of matched subdomains (whatever)
var_dump($domains[1]);Code: Select all
$homepage = file_get_contents('http://www.macsiam.com/sites.php');
preg_match_all('%\'http://([^/]+).[^.]+\.[a-z]{2,4}\'%i', $homepage, $domains, PREG_PATTERN_ORDER);
// $domains[0] is an array of matched full URLs (http://whatever.wherever.com/page.php)
// $domains[1] is an array of matched subdomains (whatever)
var_dump($domains[1]);Code: Select all
$homepage = file_get_contents('http://www.macsiam.com/sites.php');
preg_match_all('%\(\'|")http://([^/]+).[^.]+\.[a-z]{2,4}\1%i', $homepage, $domains, PREG_PATTERN_ORDER);
// $domains[0] is an array of matched full URLs (http://whatever.wherever.com/page.php)
// $domains[1] is an array of matched opening quote type (single or double) so it can be used as a reference at the close (\1)
// $domains[2] is an array of matched subdomains (whatever)
var_dump($domains[2]);