How to create URL ENCODER And URL DECODER tool with php

Hello friends today i will tell you how to create URL ENCODER AND URL DECODER tool with php,just follow this steps



step1-create a index.php file


<center>
<h2>

<?php


if(isset($_POST['submit']))

{
$str = $_POST['str'];


?>

<textarea   rows="5" cols="20">

<?php

echo urlencode($str);

?>

</textarea>
<?php
}
?>
<br>
<?php


if(isset($_POST['submit1']))

{
$str = $_POST['str'];


?>

<textarea   rows="5" cols="20">

<?php

echo urldecode($str);

?>

</textarea>
<?php
}
?>
<br>
<br>
<br><br><br>

<html>
<head>
</head>
<body>
  <h2> URL Encoder/decoder<h2>
<div id="wrapper">

<div id="convert_div">
 <form method="post"action="">
  <textarea name="str" rows="5" cols="20"></textarea>

  
  <br>
  <input type="submit" name="submit" value="URL encoder">
   <input type="submit" name="submit1" value="URL decoder">

 </form>

</div>

</div>
</body>

<br><br><br><br>






</h2>



Previous
Next Post »
Thanks for your comment