Wordpress Custom Form Function

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
anand0412
New php-forum User
New php-forum User
Posts: 1
Joined: Fri Nov 10, 2017 3:45 am

Fri Nov 10, 2017 4:04 am

Hi guys. I'm new here and new to php.

I'm trying to finish up my website which is supposed to be a free legal research platform. The Idea is to allow users to submit court judgments via front end custom post.

I'm almost done except for one feature. The users are likely to upload a scanned pdf of the court judgment which will not be searchable.

For the website to function, the contents must be searchable. I have explored the idea of using tesseract within solr search engine but realised that it isn't a good idea as ocr will use up all the server's resources and crash the site.

What I have done now is install tesseract on a separate server using the script in this site => https://diging.atlassian.net/wiki/space ... mageMagick .

The website itself is made with Wordpress.

It works great.

When the user clicks submit post,
---(a) the pdf will be uploaded to the website's server.( I am using the gravityform plugin for frontend submission.)
--(b) the post will be published with the pdf embedded.

What I need to do is this:-
1. In addition to uploading the pdf to the server, I also want to send it to the remote server for OCR;
2. Once the OCR is done, I want the remote server to send back the converted text file to the wordpress site;
3. Then, I want to insert the content of the text file into the post content area; and
4. Publish the post.

I believe this can be done with PHP's _POST and _GET request and some writing to the database.

I am learning php and mysql through lynda.com and am struggling to accomplish this. I hope someone could point me in the right direction or provide some codes that I can paste somewhere to accomplish this.

Thank you all for reading.

Post Reply