//A little script to screen scrape the Chicagoplays webpage and RSS
//feed it so I don't have to check it regularly
//Add some functions
include 'functions.php';
//Set the timezone, Generally unneeded but Robert's server thinks the time is wrong
date_default_timezone_set('America/Chicago');
//Get the page
//$page = open_page('http://www.chicagoplays.com/industry/auditions.aspx', 1, 2, 0, 0, 0, '');//$page = open_page('http://www.leagueofchicagotheatres.org/component/industryaudition/industryauditionlist.html', 1, 2, 0, 0, 0, '');
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://www.leagueofchicagotheatres.org/component/industryaudition/industryauditionlist.html');curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $page = curl_exec($ch);
//Trim off the bits we don't want
//$page = get_string_between($page, '
', '
');
//debug--make sure we get the page//echo $page;//exit();
//Explode into an Array
$entries = explode('
', $page);
//Shift the first item off, it's broken
//array_shift($entries);
//Step through the entries and pick out the data
foreach ( $entries as $val ) { //$listing['auditioncity'] = get_string_between($val, '_lbl_AuditionLocation">', ''); //$listing['auditiontime'] = get_string_between($val, '_lbl_AuditionTime">', ''); //$listing['pay'] = get_string_between($val, '_lbl_PayNoPay">', ''); //$listing['equity'] = get_string_between($val, '_lbl_EquityNonEquity">', ''); //$listing['restrictions'] = get_string_between($val, '_lbl_TypeRestrictions">', ''); //$listing['timecommit'] = get_string_between($val, '_lbl_TimeCommitment">', ''); //$listing['material'] = get_string_between($val, '_lbl_Material">', ''); //$listing['contact'] = get_string_between($val, '_lbl_ContactInfo">', ''); //$listing['email'] = get_string_between($val, '_hl_Email" href="mailto:', '">'); //$listing['website'] = get_string_between($val, '_hl_Website" href="', '" target="_blank">'); //$listing['guid'] = get_string_between($val, 'rpt_auditions_', '_lbl_');
$listing['moreurl'] = 'http://www.leagueofchicagotheatres.org'.get_string_between($val, '