Read Image Text Using PHP Tesseract-OCR Reader


read image tesseract ocr

This is post about how to read Image Text Using PHP. in this post i saw you how to read image text using php use of google Tesseract – OCR.

Google Tesseract-OCR (Optical Character Reader) Is Open Source API use to read Text From Image Using php.I am implemented this code with php in easy way.exec function is available in PHP.this function is use to execute exe file using web browser.this function also available in Windows or Linux Operating System. In Linux shell_exec Function is available to execute Linux command in web browser.



Read Text From Image Code


Image Upload Code



Instruction for Windows Operating System

For Windows First of all You Need to download Tesseract-OCR API from following Link.

Download Tesseract OCR

after Downloading Install in to C:ocr following way



Instruction For Linux

install GCC in your System Using Following Command


You Need To Install Leptonica Library go to download this library.or

You need to install Tesseract-OCR For Linux in Following Way


  • Syed Balal Rumy

    Dear, but how to use it on windows.

    • Hardik Vegad

      open cmd type

      tesseract yourfile.jpg output.txt

  • shev

    Thanks for sharing, but how can i use vietnamese for my project

  • Lam Dang

    Thanks for sharing, but It can’t read UTF8 (ex : Ă, Â, Đ, Ơ, Ô …)

  • Amit

    file_get_contents(abc.txt): failed to open stream showing Error please help me soon

  • ddd


  • Akhi

    To use and open reading text record in a smooth way this technique of tesseract ocr reader is worth pointing out factors in all the way. In order to make the process flow useful to all this is an outstanding way out to do well in every possible way. The writing services also following this.Therefore without some exceptions this is a smoother option to all the users. Thanks for sharing.