I need a script to execute a curl call when clicking a button

hello guys,
please I need some help, I’m making a web app, and I have an option to take pictures using the phone camera, then I want to add a button for Submitting the picture via Base64 (png image) to the OCR.SPACE API then returns the parsed text to the user.

Hi, is this a question about calling the OCR API with cURL? Or a general mobile phone programming question?

its a question about [calling the OCR API with cURL], here is my web app , https://Iblowit.com/webcam/demo, I want to add a button after the user take a picture, he can call the ocr api

Well, I don’t know what programming language you are using, but here is an example for PHP: https://phpenthusiast.com/blog/five-php-curl-examples