require_once('browser_emulator.php');
require_once('../functions.php');
require_once('pattern_functions.php');
require_once('database_connection.php');
$be = new BrowserEmulator();
$be->addHeaderLine("Referer", "www.ovikefs.se");
$be->addHeaderLine("Accept-Encoding", "x-compress; x-zip");
$be->addHeaderLine("Content-Type", "application/x-www-form-urlencoded");
//********************************************************************************************
$patternsize=$_POST['patternsize'];
$url=$_POST['url'];
$start_in_tag_array_post=$_POST['start_in_tag_array'];
$expand_below=$_POST['expand_below'];
$expand_over=$_POST['expand_over'];
$weekday_filter=$_POST['weekday_filter'];
$event_pattern=$_POST['event_pattern'];
$pattern_position=$_POST['pattern_position'];
$year_pattern=$_POST['year_pattern'];
$month_pattern=$_POST['month_pattern'];
$day_pattern=$_POST['day_pattern'];
//$upper_week = $this_week+3;
//for ($week = $this_week; $week <$upper_week; $week++) {
// if ($week > 53){
// $week=1;
//}
//echo $week;
//$be->addPostData("vecka", $week);
//$be->addPostData("month", $month);
//$be->addPostData("menu1", "index.php?month=3");
//$be->addPostData("month", 8 );
//$be->addPostData("year", 2009);
//$url="http://www.bonhuset.com/program_index.asp";
//$url="http://www.bonhuset.com/";
//$url="http://www.pingst-ovik.se/";
//$url="http://www.tronsskold.se/";
// Example: fetch a web page and display the return headers and
// the contents of the page (html-escaped):
/*include "Snoopy.class.php";
$snoopy = new Snoopy;
//$snoopy->user = "joe";
//$snoopy->pass = "bloe";
if($snoopy->fetch($url))
{
$snoopy->fetch($url);
echo "response code: ".$snoopy->response_code."
\n";
while(list($key,$val) = each($snoopy->headers))
echo $key.": ".$val."
\n";
echo "
\n"; echo "
".htmlspecialchars($snoopy->results)."\n"; } else echo "error fetching document: ".$snoopy->error."\n"; */ $file = $be->fopen($url); $response = $be->getLastResponseHeaders(); //print_r($response); $urlstring=get_urlstring($url,$file,"","","alltags"); //echo $urlstring."