request("https://api.telegram.org/bot"+TOKEN+"/getFile?file_id=" + file_id, { json: true }, (err, res, body) => {
if (err) { return console.log(err); }
console.log(body.result.file_path);
full = "https://api.telegram.org/file/bot"+TOKEN+"/" + body.result.file_path;
console.log (full);
const file = fs.createWriteStream("file.ogg");
const request = https.get(full, function(response) {
response.pipe(file)
})
});
});
$str = pg_escape_string($ip);
$result2 = pg_query($dbconn, "SELECT * FROM table WHERE name = '{$str}'");
реально ужасное комьюнити $query = 'SELECT name FROM database';
$result = pg_query($query);
$myrow = pg_fetch_assoc($result, [$myVar = array()] );
$value = $myrow[name];
//echo "$value";
//echo "$word";
if ($value == "$word") {
$query2 = 'SELECT path FROM documents';
$result2 = pg_query($query2);
$myrow2 = pg_fetch_assoc($result2, [$myVar = array()]);
$value2 = $myrow2[path];
echo "$value2";
} elseif ($value <> $word) {
echo "pozshral";
}