I'm having trouble with a script for my site.
I'm trying to pull a user's dragons from their scroll on the dragcave.net website.
But I want to specifically display either just the eggs or just the hatchlings. Let me know if I need to provide more info. Here is my script:
<?php
$scrollname = $_POST['scrollname'];
if (isset($_POST['submit'])) {
}
$string = file_get_contents('http://dragcave.net/user/' . $scrollname);
// Path builders for the regular expression and the HTML that follows
$path = '/image/';
$ext = '.gif';
$pattern = "#$path(.*?)$ext(.*?)#";
preg_match_all($pattern, $string, $matches);
$list = $matches[1];
$limit = count($list);
for ($i = 0; $i < $limit; $i++) {
echo "<img src=\"http://dragcave.net/image/$list[$i].gif\"><br />";
echo 'Code: ' . $list[$i] . '<br>';
}
?>
here is my scroll if you need to check the source code of the page
-http://dragcave.net/user/dragonsmistress
Please Please help me ): I've been trying to figure this out for months now!! 😕