Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $request_url ='http://www.milliyetemlak.com/';
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $request_url); // The url to get links from
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // We want to get the respone
- $result = curl_exec($ch);
- $regex='|<a.*?href="/ilandetay(.*?)"|';
- preg_match_all($regex,$result,$parts);
- $links=$parts[1];
- foreach($links as $link){
- echo "/ilandetay".$link."<br>";
- }
- curl_close($ch);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment