<?php
$cod = '192.168.0.0';
$char = '300';
$arrayFind = array('[cod]', '[char]'); $arrayReplace = array($cod, $char); echo str_replace($arrayFind, $arrayReplace, '[cod]/[char]');
Cjw/cGhwCiRjb2QgPSAnMTkyLjE2OC4wLjAnOwokY2hhciA9ICczMDAnOwokYXJyYXlGaW5kID0gYXJyYXkoJ1tjb2RdJywgJ1tjaGFyXScpOwokYXJyYXlSZXBsYWNlID0gYXJyYXkoJGNvZCwgJGNoYXIpOwplY2hvIHN0cl9yZXBsYWNlKCRhcnJheUZpbmQsICRhcnJheVJlcGxhY2UsICdbY29kXS9bY2hhcl0nKTs=