开发者

PHP - how would i be able to save each value of this var dump array?

the site: http://shawn.s开发者_Go百科c2broadcast.net/test/

the code:

<?php
$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]);
?>

question: i was wondering how i could save each value of this array seperatly?


    foreach ( $domains as $domain ) {
         //balah balah
    }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜