Hi all,

I'm trying to match a particular piece of string in a big string using a
regex in order to change it whith another value ... I mean:

eg:

$html="<a
href=link.htm?&flag=982420537&PHPSESSID=2c86b460d360b13c3ef08b8a46b9cafc>Lnk
</a>";

function change_sess(&$html_code){
        if(eregi("&flag=[0-9]{9}&PHPSESSID=[[:alnum:]]{32}",$html_code)){

str_replace("&flag=[0-9]{9}&PHPSESSID=[[:alnum:]]{32}","<?=append_url();?>",
$html_code);
        }
}

change_sess($html);
...
$fp=fopen($my_file,"w");
fwrite($fp,$html);
...

But open the $my_file, the changes are not applied ... (I mean: there's
always the original string -->
&flag=982420537&PHPSESSID=2c86b460d360b13c3ef08b8a46b9cafc)

Anyone could help me, please?

many thanks in advance
max


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to