Exemplo n.º 1
0
//INITIALIZED ARRAYS FOR DATA, TITLE, IMAGE AND PRICE
$amazon_data = array();
$amazon_title = array();
$amazon_img = array();
$amazon_price = array();
$flipkart_data = array();
$flipkart_title = array();
$flipkart_img = array();
$flipkart_price = array();
//IF SEARCH IS NOT FETCHED THROUGH GET METHOD, KILL REST OF THE PAGE (USED WHEN THE PAGE IS OPENED INITIALLY)
if (!isset($_GET['search'])) {
    die;
}
//CALLED FUNCTIONS THAT FETCH HTML CODE FROM RESPECTIVE SITES.
$flipkart_data = flipkart($_GET["search"]);
$amazon_data = amazon($_GET['search']);
//STORING DATA IN VARIABLES FOR AMAZON
$j = 0;
foreach ($amazon_data[0] as $x) {
    $amazon_title[$j] = $x;
    $j++;
    if ($j > 19) {
        break;
    }
}
$j = 0;
foreach (@$amazon_data[1] as $x) {
    $amazon_img[$j] = $x;
    $j++;
    if ($j > 19) {
        break;
Exemplo n.º 2
0
				<h1><?php 
echo $mov['title'];
?>
</h1>
				<div class="factframe">
					<?php 
echo dates($mov['theater'], "Theatrical Release") . dates($mov['video'], "Home Video Release") . short($mov['short']) . boxoffice($mov['boxoffice']);
?>
				</div>
				
				<h2>Links</h2>
				<div class="factframe">
					<div class="factbox">
						<img src="/imgs/interface/amazon.png" alt="amazon logo" class="amazon_logo">
						<?php 
echo amazon($mov['3d'], $mov['bluray'], $mov['dvd'], $mov['cd'], $mov['book'], $mov['title']);
?>
					</div>
					<div class="factbox">
						<h3>Other Links</h3>
						<?php 
if (!empty($mov['trailer'])) {
    echo '<p><a href="' . $mov['trailer'] . '">Watch the Trailer</a></p>';
}
if (!empty($mov['imdb'])) {
    echo '<p><a href="' . $mov['imdb'] . '">' . $mov['title'] . ' IMDb Page</a></p>';
}
?>
					</div>
				</div>