Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $buf.='[/tbl]';
- $iobuffer.=nenscript_pcre_from_source('[<]'.$buf.'[>]');
- $buf='';
- $resources=zoey_rip_resources($iobuffer);
- $restable='';
- if(is_array($resources))
- if(count($resources)>0)
- {
- $restable.'[tbl]';
- foreach($resources as $key => $value)
- $restable.'[row][col][<]##'.strval($key).'[>][/col][col style="text-align: left;"][<][tt][url="'.$value.'"]'.htmlentities($value).'[/url][/tt][>][/col][/row]';
- $restable.'[/tbl]';
- }
- $iobuffer.=nenscript_pcre_from_source('[<]'.$restable.'[>]');
- $iobuffer.='<script language="JavaScript">document.title=\''.addslashes(preg_replace('/\r\n/','',$nenini['title'])).'\';</script>';
- $iobuffer.='</body>';
- $iobuffer.='</html>';
- echo $iobuffer;
- function zoey_rip_resources($subject=NULL)
- {
- switch(gettype($subject))
- {
- case 'NULL':
- break;
- case 'string':
- break;
- case 'integer':
- case 'float':
- case 'boolean':
- $subject=strval($subject);
- break;
- default:
- $subject=NULL;
- }
- if(!is_string($subject))
- $ret=NULL;
- else
- {
- $ret=array();
- for($test=NULL;$test!==false;)
- {
- echo '<h1>test="<tt>'.strval($test).'</tt>"</h1>';
- $test=false;
- $pattern='(.*) href="([^"]*)"(.*)';
- if(preg_match('/'.$pattern.'/',$subject,$matches))
- {
- echo '<h1><tt>href="<tt>'.htmlentities($matches[2]).'</tt>"</h1>';
- echo '<h1><tt>0="<tt>'.htmlentities(strlen($matches[0])).'</tt>"</h1>';
- echo '<h1><tt>s="<tt>'.htmlentities(strlen($subject)).'</tt>"</h1>';
- if($matches[0]===$subject)
- {
- echo '<h1><tt>href="<tt>'.htmlentities($matches[2]).'</tt>"</h1>';
- $test=true;
- $ret[count($ret)]=$matches[2];
- $subject=preg_replace('/'.$pattern.'/','$1$3',$subject);
- }
- }
- $pattern='(.*) src="([^"]*)"(.*)';
- if(preg_match('/'.$pattern.'/',$subject,$matches))
- {
- echo '<h1><tt>src="<tt>'.htmlentities($matches[2]).'</tt>"</h1>';
- if($matches[0]===$subject)
- {
- echo '<h1><tt>src="<tt>'.htmlentities($matches[2]).'</tt>"</h1>';
- $test=true;
- $ret[count($ret)]=$matches[2];
- $subject=preg_replace('/'.$pattern.'/','$1$3',$subject);
- }
- }
- }
- }
- echo '<h1>test="<tt>'.strval($test).'</tt>"</h1>';
- return $ret;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement