Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as PHP by Anton ( 14 years ago )
$content = get_data($r['eztv_link']);
$episodes = get_match_all('/class="epinfo">(.*)</a>/isU',$content); 


function get_match($regex,$content) {
  preg_match($regex,$content,$matches);
  return $matches[1];
 }

 function get_match_all($regex,$content) {
  preg_match_all($regex,$content,$matches);
  return $matches[1];
 }
 
 function get_data($url) {
  $ch = curl_init();
  $timeout = 50;
  curl_setopt($ch,CURLOPT_URL,$url);
  curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
  $data = curl_exec&#40;$ch&#41;;
  curl_close($ch);
  return $data;
 }

 

Revise this Paste

Parent: 47874
Your Name: Code Language: