Several things are wrong with this code (pagetextbyidn.code.php). Try this code:
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<?php
if (!defined( 'SED_CODE' )){ die ( 'Wrong URL.' ); }
$currenttpl = file_get_contents ( $mskin );
if (mb_strpos( $currenttpl , "{PAGE_TEXT_ID_" ) !== false)
{
$matches = array ();
preg_match_all( "#{(?P<tag>PAGE_TEXT_ID_(?P<id>[0-9]+))}#" , $currenttpl , $matches , PREG_SET_ORDER);
foreach ( $matches as $match ){
$p_tag = $match [ 'tag' ];
$p_id = $match [ 'id' ];
etc...
|
Update: fixed the regex