Beispiel #1
0
/**
 * Get week-nummer from homepage
 *
 * @return string
 */
function Get_Week()
{
    global $content_dir;
    $result = '';
    $path = "{$content_dir}/kulichki.net.week.html";
    if (!is_aktuell($path)) {
        $html = getdata('http://www.kulichki.tv');
        if (write_html($html, $path) == 0) {
            print $message;
        }
    }
    $html = file_get_contents($path);
    $result = preg_split('%</FORM>%', $html);
    foreach ($result as $form) {
        if (preg_match('/name="week" value=(\\d*)>.+Спутниковое ТВ/u', $form, $result2)) {
            $week = $result2[1];
        }
    }
    //echo $week;
    return $week;
}
/**
 * Get week-nummer from homepage
 *
 * @return string
 */
function Get_Week()
{
    global $content_dir;
    $result = '';
    $path = "{$content_dir}/kulichki.net.week.html";
    if (!is_aktuell($path)) {
        $html = getdata('http://www.kulichki.tv');
        write_html($html, $path);
    }
    $html = file_get_contents($path);
    //echo $html;
    if (preg_match('/name="week" value=(\\d*)>/u', $html, $result)) {
        //var_dump($result);
        $week = $result[1];
    }
    return $week;
}