Bin2hex and hex2bin help in php

hello
i change php code using bin2hex and i want when hex2bin code run php
for example

$r456t = ‘$str1 = "[email protected]";’;
echo bin2hex($r456t) . "
";
get output result
2473747231203d202272617979333435363738393233343535353636406578616d706c652e636f6d223b

next page create “bin.php” i used this code

hex2bin(“3c3f706870202473747231203d202272617979333435363738393233343535353636406578616d706c652e636f6d223b203f3e”);

echo $str1;

how get result
[email protected]

thanks

I have no idea what your logic is with $r456t = ‘$str1

keep it simple:

<?php
  $r456t = '[email protected]';
  $str1 = bin2hex($r456t);
  $str2 = hex2bin($str1);
  echo '<p>string1 = ' . $str1 . '</p>';
  echo  '<p>string2 = ' . $str2 . '</p>';
?>

I want someone no see my PHP code so that I can change the first PHP code using bin2hex($r456t) to get a Binary code.
Then i want to use this Binary code in the PHP place.

Tell us about the REAL problem you are trying to solve instead of asking about your attempted solution to the real problem.

1 Like

seems to me that you are trying to encrypt php code to prevent people from seeing your code. well that is silly. if you want to make hurdles, then use a compiled program like c++. php can interact with c++ and even d language for that matter. encrypting an interpreted language is a waste of time and it will slow down your web site on top of it.

i remember looking up search engine examples in php a few years ago. i found a German site with a search script for free use. I wanted to look at the source code to get an idea abou how to design a search script. the guy encrypted his code, which pissed me off. i decrypted the code within 30 seconds. see my point? really silly.

if you are having trouble with a shared host then switch to a dedicated server or buy/build your own server. That is my opinion anyway.

Sponsor our Newsletter | Privacy Policy | Terms of Service