Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. <?php
  2. $url = 'http://www.acs.utah.edu/uofu/stu/scheduling/?cmd=index&classtype=g&term=1158';
  3. $data = file_get_contents($url);
  4. //$regex = "/class=\"href=\"(.*)\"/";
  5. $regex = "/<a class=\"schedlinks\" href=\"(.*)\">/";
  6. //$regex = "/<a\s*(.*)\>(.*)<\/a>/";
  7. preg_match($regex,$data,$match);
  8. var_dump($match);
  9. echo $match[1];
  10. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement