Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $a = 'http://www.soccerfitness.com/testing/2/2-yo-yo-endurance-test';
- // $a = 'http://belatmos.blogspot.com/2012/12/snow.html?showComment=1376946597608';
- $contents = file_get_contents($a);
- $site = 'topwritingservices.net';
- $site = str_ireplace('http://', '',$site);
- $site = rtrim( $site, '/' );
- $key = 'topwritingservices.net';
- $pattern = "~<a[\s]+(rel=\"nofollow\"[\s]+)?([^>]*)href=(\"|')http://{$site}[/]?\g{-1}(\g{-3})?([^>]*)>(http://|https://)?({$key})</a>~imu";
- $matched = preg_match_all( $pattern, $contents, $links );
- echo "<br>" . ( !$matched ? 'false': 'true' ) . "\n";
- print_r($links);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement