Seanslar





[insert_php]

require_once(‘./simple_html_dom.php’);

$sehiradi= $_GET[‘sehir’];

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, ‘https://www.google.co.uk/movies?near=’.$_GET[‘sehir’]);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
$str = curl_exec($curl);
curl_close($curl);

$html = str_get_html($str);

$sayi=1;
foreach($html->find(‘#movie_results .theater’) as $div) {

print utf8_encode(“

“.$div->find(‘h2 a’,0)->innertext.’ ‘.$div->find(‘h2’,0)->innertext.”

“);

print ‘

‘;
print utf8_encode(““.$div->find(‘.desc .info’,0)->innertext.”“);

foreach($div->find(‘.movie’) as $movie) {
print utf8_encode(““.$movie->find(‘.name a’,0)->innertext.’
‘);

print utf8_encode(““.$movie->find(‘.info’,0)->innertext.’‘);

print “ “.$movie->find(‘.times’,0)->innertext.’‘;

}
print “

“;

$sayi++;
}

$html->clear();

if($sehiradi==”İstanbul”){

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, ‘https://www.google.co.uk/movies?near=istanbul&start=10’);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
$str = curl_exec($curl);
curl_close($curl);

$html = str_get_html($str);

$sayi=11;
foreach($html->find(‘#movie_results .theater’) as $div) {

print utf8_encode(“

“.$div->find(‘h2 a’,0)->innertext.’ ‘.$div->find(‘h2’,0)->innertext.”

“);

print ‘

‘;
print utf8_encode(““.$div->find(‘.desc .info’,0)->innertext.”“);

foreach($div->find(‘.movie’) as $movie) {
print utf8_encode(““.$movie->find(‘.name a’,0)->innertext.’
‘);

print utf8_encode(““.$movie->find(‘.info’,0)->innertext.’‘);

print “ “.$movie->find(‘.times’,0)->innertext.’‘;

}
print “

“;

$sayi++;
}

$html->clear();

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, ‘https://www.google.co.uk/movies?near=istanbul&start=20’);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
$str = curl_exec($curl);
curl_close($curl);

$html = str_get_html($str);

$sayi=21;
foreach($html->find(‘#movie_results .theater’) as $div) {

print utf8_encode(“

“.$div->find(‘h2 a’,0)->innertext.’ ‘.$div->find(‘h2’,0)->innertext.”

“);

print ‘

‘;
print utf8_encode(““.$div->find(‘.desc .info’,0)->innertext.”“);

foreach($div->find(‘.movie’) as $movie) {
print utf8_encode(““.$movie->find(‘.name a’,0)->innertext.’
‘);

print utf8_encode(““.$movie->find(‘.info’,0)->innertext.’‘);

print “ “.$movie->find(‘.times’,0)->innertext.’‘;

}
print “

“;

$sayi++;
}
$html->clear();

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, ‘https://www.google.co.uk/movies?near=istanbul&start=30’);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
$str = curl_exec($curl);
curl_close($curl);

$html = str_get_html($str);

$sayi=31;
foreach($html->find(‘#movie_results .theater’) as $div) {

print utf8_encode(“

“.$div->find(‘h2 a’,0)->innertext.’ ‘.$div->find(‘h2’,0)->innertext.”

“);

print ‘

‘;
print utf8_encode(““.$div->find(‘.desc .info’,0)->innertext.”“);

foreach($div->find(‘.movie’) as $movie) {
print utf8_encode(““.$movie->find(‘.name a’,0)->innertext.’
‘);

print utf8_encode(““.$movie->find(‘.info’,0)->innertext.’‘);

print “ “.$movie->find(‘.times’,0)->innertext.’‘;

}
print “

“;

$sayi++;
}

$html->clear();

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, ‘https://www.google.co.uk/movies?near=istanbul&start=40’);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
$str = curl_exec($curl);
curl_close($curl);

$html = str_get_html($str);

$sayi=41;
foreach($html->find(‘#movie_results .theater’) as $div) {

print utf8_encode(“

“.$div->find(‘h2 a’,0)->innertext.’ ‘.$div->find(‘h2’,0)->innertext.”

“);

print ‘

‘;
print utf8_encode(““.$div->find(‘.desc .info’,0)->innertext.”“);

foreach($div->find(‘.movie’) as $movie) {
print utf8_encode(““.$movie->find(‘.name a’,0)->innertext.’
‘);

print utf8_encode(““.$movie->find(‘.info’,0)->innertext.’‘);

print “ “.$movie->find(‘.times’,0)->innertext.’‘;

}
print “

“;

$sayi++;
}

$html->clear();

}

[/insert_php]