Help to pack random hex

This is where you share YOUR scripts with others

Moderators: macek, egami, gesf

tesmanuk
New php-forum User
New php-forum User
Posts: 1
Joined: Mon Jan 23, 2012 3:09 am

Help to pack random hex

Postby tesmanuk » Mon Jan 23, 2012 3:58 am

Code: Select all

<?php
$text ="world";
$str="hello ".str_replace("/","&",$text);
$hex1=bin2hex($str);
function random($match) {return $match[1].rand(0,9);}
$hex2=preg_replace_callback("/([a-zA-Z0-9]{2})/",'random',$hex1);
echo $hex2;
?>

i need help to pack from $hex2 to get original text "hello world" please help me :help: :help:

Return to “Your Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest

cron