Guest User

tbt

a guest
Dec 16th, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. <?
  2. $request_url ='http://www.milliyetemlak.com/';
  3.  
  4. $ch = curl_init();
  5. curl_setopt($ch, CURLOPT_URL, $request_url); // The url to get links from
  6. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // We want to get the respone
  7. $result = curl_exec($ch);
  8.  
  9. $regex='|<a.*?href="/ilandetay(.*?)"|';
  10. preg_match_all($regex,$result,$parts);
  11. $links=$parts[1];
  12. foreach($links as $link){
  13. echo "/ilandetay".$link."<br>";
  14. }
  15. curl_close($ch);
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment