$value) { $$key = $value; } } /* detecting the magazine */ $maginfo = $_SERVER["SERVER_NAME"]; /* \/ this is on the local server \/ */ /* \/ this is on the remote server \/ */ if( substr($currentpage,2,8) == 'maxchevy' || substr($maginfo,4,8) == 'maxchevy' ) { $magname = 'MaxChevy'; } else if( substr($currentpage,2,8) == 'moparmax' || substr($maginfo,4,8) == 'moparmax' ) { $magname = 'MoparMax'; } ?> ::: <?php echo $magname; ?> ::: Email this Story :::

from Volume , Issue

'; // this is a replacement image directory so that we can get photos and stuff to display. $imagedir = $templink."images/"; // iterate through every number up to $page (the number of pages, determined above). Put our pagename string into $printpage. Then get the contents of $printpage's page // into a string. for($i=1;$i<=$page;++$i) { $printpage = $newlink.'-'.$i.'.html'; $pagestr[$i] = file_get_contents($printpage); // there's still a BUNCH of nondisplaying garbage in the string at this point, but i don't know regexes well enough to get rid of all of it. So just // get rid of the stylesheet links; they're what was really screwing things up. $pagestr[$i] = preg_replace($pattern,"",$pagestr[$i]); // for some reason, that leaves a bunch of empty <> strings in the text. so ditch them. $pagestr[$i] = str_replace('<>',"",$pagestr[$i]); // replace our image directory with the new one, and echo. echo(str_replace('" type="text/css" media="screen" />','',str_replace('images/',$imagedir,$pagestr[$i]))); } ?>
© 2006 MaxChevy and RacingNetSource

Close this window