以下是引用radiofan在2021-3-18 07:58:29的发言:
CLEAR
Http = CreateObject("MSXML2.XMLHttp")
Http.Open("Post","https://aip.你的id&client_secret=你的secret",.F.)
Http.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded")
Http.Send()
lcReturn = Http.ResponseText
*从lcReturn中获取token
lcimage = Filetostr('发票.JPG')
lcimage1 = STRCONV(lcimage,13)
Set Library To myfll
lcimage2 = URLEncode(lcimage1)
Set Library To
StrPost = 'access_token=获取的token' + '&image=' + lcimage2 + '¶graph=true&probability=true'
Http.Open("Post","https://aip.,.F.)
Http.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded")
Http.Send(StrPost)
lcReturn = Http.ResponseText
*从lcReturn中获取你要的信息,比如发票金额等!
CLEAR
Http = CreateObject("MSXML2.XMLHttp")
Http.Open("Post","https://aip.你的id&client_secret=你的secret",.F.)
Http.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded")
Http.Send()
lcReturn = Http.ResponseText
*从lcReturn中获取token
lcimage = Filetostr('发票.JPG')
lcimage1 = STRCONV(lcimage,13)
Set Library To myfll
lcimage2 = URLEncode(lcimage1)
Set Library To
StrPost = 'access_token=获取的token' + '&image=' + lcimage2 + '¶graph=true&probability=true'
Http.Open("Post","https://aip.,.F.)
Http.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded")
Http.Send(StrPost)
lcReturn = Http.ResponseText
*从lcReturn中获取你要的信息,比如发票金额等!
都有详细的api文档的。