<?
#### INLOG MAKEN
$action="www.sitevanforcheck.nl" ;
$ch = curl_init($action);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt($ch, CURLOPT_HEADER, true );
curl_setopt($ch, CURLOPT_POST, true );
curl_setopt($ch, CURLOPT_POSTFIELDS, "Username=gebruikersnaam&Password=wachtwoord&Redirect=loggedIn.jsp") ;
curl_setopt($ch, CURLOPT_REFERER, "www.sitevanformulier.nl" );
#curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT , 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1');
$r=curl_exec($ch);
preg_match_all("|Set-Cookie: (.*)|i", $r, $cookie);
print_r($cookie);
##### OK IETS UITLEZEN EEN PAGINA
$ch = curl_init(www.hiermoetuitgelezenworden.nl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt($ch, CURLOPT_HEADER, true );
curl_setopt($ch, CURLOPT_COOKIE, $cookie[0] );
curl_setopt($ch, CURLOPT_COOKIE, $cookie[1] );
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_REFERER, $action );
curl_setopt($ch, CURLOPT_USERAGENT , 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1');
$r=curl_exec($ch);
$r = nl2br($r);
print $r;
?>
Notice: Array to string conversion in /Users/joostvandermeijden/mamp_sites/sites/sanizo.nl/check_prices.php on line 27
Notice: Array to string conversion in /Users/joostvandermeijden/mamp_sites/sites/sanizo.nl/check_prices.php on line 28
Mvg, Hans.
1.268 views