See No Evil
The Brood
Alligator
Evil Dead
The Company Of Wolves
Bride Of Re-Animator
Suspiria
Scanners
The Devil's Backbone
Children Of The Corn 2: The Final Sacrifice
Los Sin Nombre
Dog Soldiers
The Gate
Creature From The Black Lagoon
Dracula
NEW ORLEANSIN FRANKENSTEIN
Frankenstein
The Bride Of Frankenstein
The Mummy
The Invisible Man
The Wolf Man
Phantom Of The Opera
Silent Night, Deadly Night 2
Mimic
Meet the feebles
Braindead
Land Of The Dead
Hellraiser
Hellraiser: Hellseeker
The Grudge / KAUNA
28 Days Later
28 Weeks Later
Children Of The Corn 2: The Final Sacrifice
Christine
Wishmaster
Sleep Hollow
Sleepy Hollow
The Others
The Orphanage
Phone
Jeepers Kreepers
The Gathering
Pan's Labyrinth
The Chinese Ghost Story
The Chinese Ghost Story II
Arachnid
Thirteen Ghosts
Damien: Omen II
Omen III: The Final Conflict
Dagon
The Exorcism of Emily Rose
Scream 3
The Calling
Deathwatch
The Ring
Jason X
A Nightmare on Elm Street
New Nightmare
A Nightmare on Elm Street 3: Dream Warriors
A Nightmare on Elm Street 4: The Dream Master
A Nightmare on Elm Street Part 2: Freddy's Revenge
A Nightmare on Elm Street 5: The Dream Child
Freddy's Dead: The Final Nightmare
American Psycho
Arachnophobia
Nosferatu the Vampyre
Alien
Aliens
Alien 3
Alien: Resurrection
Schiave bianche: violenza in Amazzonia
Bad Moon
Below
Blade
The Blob
The Breed
The Bunker
Cabin Fever
Caligula
Catacombs
The Cell
Zombie Flesh Eater
Maximum Overdrive
Queen Of The Damned
Virus
Alien
Varjojen valtakunta
Dracula 2001
Sweeney todd
Thirteen Ghosts
28 Days Later
Pan's Labyrinth
Sleepy Hollow
The Orphanage
Hellraiser
Land Of The Dead
28 Weeks Later
The Exorcism of Emily Rose
The Grudge / KAUNA
Mary Shelley's Frankenstein
Razor Blade Smile
Bram Stoker's Dracula
Exorcist: The Beginning
The Exorcist III
The Omen
Omen IV: The Awakening
The Omen (2006)
Wes Craven's New Nightmare
Friday the 13th
Van Helsing
Alien Quadrlogy
El orfanato
Blade: The Series
Ghost Ship
An American Haunting
Carrie
Salainen ikkuna
Ylläolevan listauksen suoritti alla oleva koodi.
Esimerkkikoodi
<?php
// oletusarvot
$name = "Kauhu";
$id = 1;
$url = "http://leffapalsta.fi/api/genre.php?do=searchname&name=" . urlencode($name);
// haetaan genren nimen perusteella
if(isset($_GET['name']) ) {
$name = urldecode($_GET['name']);
$url = "http://leffapalsta.fi/api/genre.php?do=searchname&name=" . urlencode($name);
}
// haetaan genren id:n perusteella
if(isset($_GET['id']) ) {
$id = urldecode($_GET['id']);
$url = "http://leffapalsta.fi/api/genre.php?do=searchid&id=" . urlencode($id);
}
// haetaan sisältö
$data = file_get_contents($url);
// simplexml ei tykkää & merkistä, muutetaan se unicoden mukaiseksi
// http://www.fileformat.info/info/unicode/char/0026/index.htm
$data = str_replace("&", "U+0026", $data);
// parsitaan xml
$xml = simplexml_load_string($data);
// mikäli jotain löytyi, tehdään sillä mitä halutaan
if($xml) {
foreach ($xml->content as $r) {
$title = $r->title;
// data tulee utf-8:na, konvertoidaan isoksi (voit jättää tämän väliin)
// korjaa skandit sun muut, mikäli sivun charset ei ole utf-8
$title = mb_convert_encoding($title, "ISO-8859-1", "UTF-8");
$link = $r->link['href'];
// muutetaan aiemmin muutetut & merkit takaisin
$title = str_replace("U+0026", "&", $title);
$link = str_replace("U+0026", "&", $link);
echo '<h2><a href="' . $link . '">' . htmlentities($title) . '</a></h2>';
}
}