Android Question Convert code to B4A

fardows_0x

New Member
hello guys i want this code in B4A but i don't know too much about those
if anyone can convert it to B4A code please translate it , here is the code
already thanks ?
To Convert:
$bot_url    = "https://api.telegram.org/bot<bot_id>/";
$url        = $bot_url . "sendPhoto?chat_id=" . $chat_id ;

$post_fields = array('chat_id'   => $chat_id,
    'photo'     => new CURLFile(realpath("/path/to/image.png"))
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    "Content-Type:multipart/form-data"
));
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
$output = curl_exec($ch);
 

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi,Are you transfer curl code to b4j ?
 
Upvote 0
Top