Facebook
From Bulky Marten, 3 Years ago, written in Plain Text.
This paste is a reply to Untitled from emm - view diff
Embed
Download Paste or View Raw
Hits: 152
  1. <?php
  2. $url = "http://cmf-bm.web.nku.edu.tr/DersProgram%C4%B1/0/s/3945/970";
  3. $ch = curl_init($url);
  4. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  5. $source = curl_exec($ch);
  6. curl_close($ch);
  7.  
  8. preg_match_all('#<td>(.*?)</td>#', $source,$info);
  9. for($i = 0; $i <= count($info[1]) - 5; $i += 5)
  10. {
  11.         echo "Eczane Adı :" . $info[1][$i] . "<br />";
  12.         echo "Eczane Adresi :" . $info[1][$i + 1] . "<br />";
  13.         echo "Eczane Telefon Numarası :" . $info[1][$i + 2] . "<hr>";
  14. }
  15. ?>