Webook outgoing send file


#1

I want to send files by rocket chat through webook, I have a php that receives text but I have no idea how to do to receive images and documents, does anyone have a light?

?php

$content = file_get_contents(‘php://input’);
$json = json_decode($content);

$timestamp= $json->timestamp;

$user_name = $json->user_name;

$text = $json->text;

?