dragonsmistress Posted December 21, 2008 Share Posted December 21, 2008 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>'; } ?> Link to comment https://forums.phpfreaks.com/topic/137869-need-help/ Share on other sites More sharing options...
carrotcake1029 Posted December 21, 2008 Share Posted December 21, 2008 Well being unfamiliar with the website, I don't know the format of the page. Could you give us a link with a working "scroll"? Link to comment https://forums.phpfreaks.com/topic/137869-need-help/#findComment-720543 Share on other sites More sharing options...
dragonsmistress Posted December 21, 2008 Author Share Posted December 21, 2008 Sure! Here's my scroll....http://dragcave.net/user/dragonsmistress Link to comment https://forums.phpfreaks.com/topic/137869-need-help/#findComment-720548 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.