How To Create Word Counter Tool In Php-Full Guide

php  html

How To Create word Counter Tool-Php Tools
Hello Friends Ajj Me Apko Btaunga Ki Ham Kis Prakar Apni Website Me  Php And Html Ka Use Karke  Word Counter Tool Bana Sakte Hai.Yahna Is Wordk Counter Tool Me App 2 Trah Se Word Ko Count Kar Sakte Hai
Type-
1-      Aap Simple Text Box Me Apne Content Ko Paste Karke Submitpaste Button  Par Click Kijiye .Click Karne Ke Bad Apko Result Me Total Number Of Words Jo Apne Paste Kiye Hai Unka Total Number Show Hoga
2-      Upload(upload file php)- Yanha Aap Apne Computer Se  (Txt,Pdf,Doc,Docx)File Upload  Karke Word Count Kar Sakte Ho.
(App Css Aur Bootstrap Ka Use Karke Ise Mobile Responsive & Stylish Bna Sakte Ho)

Php Web Development-Steps for create Tool

·         Yanha Sabse Pehle Ham Html Ka Use Karke Do Form Bnayege  Ek Content Paste Karne Ke Liye Text Box Ke Liye Or Dusra Upload Option Lgane Ke Liye Taki Upload Option Ka Use Krke Ham File Ko Upload Kar Paye.

Note-Aap Apne Project  Me Index.Php File Ke Sath Ek Uploads  Name Ka Folder Jarrur Bana Le Kiunki Jo File Aap Apload Karoge Wo Us Folder Me Save Hogi .To Please Apne Project Ya Website Me Uploads Ka Folder Jaarur Bna Lijiye
index.php-

<center>

<!DOCTYPE html>

<html>

<body>

<h1>welcome to gajabwap tools</h1>

<h1>Word Counter Tool</h1>



<?php



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

echo str_word_count ($love=$_POST["love"]);







}

?>



</body>

</html>

<form action="" method="post">



<br>

<br>

<textarea name="love" type="text" placeholder=”paste your content here”></textarea>

<input type="submit" name="submit1" value="submitpaste">





</form>

<br>





Or

<br>

Upload Txt/Pdf/Docs Files



<br>

<br>





<form method="post" action="" enctype="multipart/form-data">

<h2>upload your file for word count here</h2>

   <input type="file" name="docfile" />

    <input type="submit" name="submit" value=”submitupload />

</form>



<?php

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

        $file = $_FILES['docfile']['name'];

        $file = str_replace(" ","_",$file);

        //$file = file_get_contents($file);



        $ext = pathinfo($file, PATHINFO_EXTENSION);

        move_uploaded_file($_FILES['docfile']['tmp_name'],"uploads/".$file);



        if($ext == "txt" || $ext == "pdf" || $ext == "doc" || $ext == "docx"){

            $file = file_get_contents("uploads/".$file);

            echo str_word_count($file);

        }

    }

?>



</center>







Demo-Free Keyword Counter



Is Parkar Aap Easily Apne Website Ke Liye Word Counter Tool Bana Sakte Ho Wo Be Sirf 5 Minutes Me. Agar Apko Mere Post Achi Lagi To Ise Apne Friends Ke Sath Share Karna Mat Bhuliyega.Ese He Post He Liye Hmare Blog Par Bane Rahe.Agar Apko Post Se Related Koi Be Problem A Rhe Hai To Aap Mujse Comment Section Me Swal Kar Sakte Ho Ya Contact Form ,Facebook Page Ke Through Mujse Contact Kar Sakte Ho Me Apki Puri Sahayata Karne Ki Koshish Karunga,
Thank You
Team Gajabwap
Web In Hindi

Previous
Next Post »
Thanks for your comment