i guys Im here again, now I got this problem with a loop. The script is at the end of the message so you guys can review it. Now to the problem: I have a script that go to a site and try to access an url like www.domain.com/story/variable/ it should do the following: Try to open the page if it doesnt exist return false for the boolean check, If not should echo the page and add to the variable to be like: www.domain.com/story/1/ www.domain.com/story/2/ www.domain.com/story/3/ etc... I'm trying to echo all the pages in one html adding it after echoing it. It just return some strange values like "z" or a pund signal... Anyone off you guys up to the task? Thanks a lot... Rodrigo <? $urlChapter = 1;//'/'.$_POST["chapter"].'/'; $urlStory = '/s/'.$_POST["story"]; $urlMain = "http://www.domain.com"; $url = "$urlMain"."$urlStory"."$urlChapter"; $texto = file("$url"); $result2 = count($texto); $i = 0; while ($i < $result2) { echo "$texto[$i]"; $i++; } while (@fopen("http://www.domain.com/s/$urlStory/$urlChapter/","r")!=null) { $pega = @fopen("$urlMain"."$urlStory"."$urlChapter","r"); $pega = strip_tags($pega, '<p></p><br>'); echo "$pega"; $urlChapter++; } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php