Post by Exilereven on Oct 1, 2021 3:22:36 GMT
I can base64 a string, and send that string to php server, then manipulate etc...
but
I have searched around google the last few days and can't really find a solution that will allow Ankulua to actually get the base64 from an image as a string so that I can interpret via PHP script on the other side, I dont need to know how to encode a string, I can do that...I need to base64 an image, which is POST and longer. I can send POST but I can't figure out a solution inside or outside Ankulua that I can use within the script to send the image base64 strings to my php server. I'm trying to use something like this here. Any help would be much appreciated. Or if anyone knows how to "hook/load" anything with Ankulua that allows me to use it via shell command or loaded library that can send images as files(i'll take it if it works lol), or ideally just get base64 from image and let me use that variable in Ankulua so I can send the string.
but
I have searched around google the last few days and can't really find a solution that will allow Ankulua to actually get the base64 from an image as a string so that I can interpret via PHP script on the other side, I dont need to know how to encode a string, I can do that...I need to base64 an image, which is POST and longer. I can send POST but I can't figure out a solution inside or outside Ankulua that I can use within the script to send the image base64 strings to my php server. I'm trying to use something like this here. Any help would be much appreciated. Or if anyone knows how to "hook/load" anything with Ankulua that allows me to use it via shell command or loaded library that can send images as files(i'll take it if it works lol), or ideally just get base64 from image and let me use that variable in Ankulua so I can send the string.
function Game.static:sendSS()
toast("found needed image")
setImagePath(SYS.DIR_TEMP)
Region(436, 197, 408, 523):saveColor('image.png')
toast("saving image")
wait(2)
------------------------------------------------------------
local imageString = base64(SYS.DIR_TEMP.. "image.png") --is there any way to get base64 from the image in lua? This is just a mock function to show what i'm trying to use it for.
------------------------------------------------------------
local http, err = pcall(httpPost,'https:\\mywebsite.com/index.php?img='..(imageString)) --mywebsite-- change to your own website setup with php.
toast('sent http request')
setImagePath(SYS.DIR_IMAGES)
end