in

Bin to Hex Convert Online – PHP Script Code

Bin to hex convert

Today we share a simple script that allow you to convert Binary to Hexadecimal or vice versa (Reverse convert Hex to Bin).  That’s Simple code written in PHP you can just upload it to server and run website.

If you want to create a code then just follow these steps create a index.php file and put below code into it

Binary to Hexadecimal or vice versa Converter Form:

<h2>Bin To Hex</h2>
 <form action="#" method="post">
 <input type="text" name="bin" placeholder="Enter Binary here..eg ABCD" value="<?php global $bin; echo $bin; ?>"/>
 <input type="submit" name="subin" value="Submit" /> 
 </form>
 Result in Hex:</br><textarea rows="4" cols="50"><?php Global $hex; echo $hex; ?></textarea>
 <h2> Hex to Bin </h2>
 <form action="#" method="post">
 <input type="text" name="hex" placeholder="Enter Hex here..eg 61626364" value="<?php global $hex; echo $hex; ?>" /> 
 <input type="submit" name="subhex" value="Submit" />
 </form>
 
 Result in Bin:</br><textarea rows="4" cols="50"><?php global $bin; echo $bin; ?></textarea>

 

Into above code there is form create to entry and result from user input. If you want change input field from text to bigger size textarea then jus replace to code textarea.

Bin To Hex Convert PHP Code:

<?php

 if (isset($_POST['subin']))
 {
 $first=$_POST['bin'];
 $hex=bin2hex($first); 
 }
?>

Hexadecimal To Binary Convert PHP Code:

<?php
if (isset($_POST['subhex']))
 {
 $second=$_POST['hex'];
 $bin=hex2bin($second);
 }

 ?>

 

Our code on Github you can download from there and upload to server. Try our PHP URL Remote File Upload Script.

Instruction: Uploading Hex to Bin Script to server:

  1. Download Script from Github
  2. Upload it too server rood directory.
  3. Unzip master.zip file on server
  4. Just test your website now !

 

Hex to Bin Convert
Full Website Screenshot

 

Also read and contribute to our code online on Github . Do you have any question or suggestion share with us on comment box. Some small instruction also written in Readme file.

Features:

  • Simple PHP Coding
  • Meta Description and Keyword Added (You can change them)
  • Put Ads into website lots of free area
  • Social profile button are added into script.
  • CSS Defined HTML5 Ready.

12 Comments

Leave a Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Advantages and Disadvantages of Custom ROMs

WordPress Theme check Issue

Resolve WordPress Theme Check Issue