shit code (that really saves the day)
166 subscribers
24 photos
6 videos
30 files
16 links
cooked scripts
Download Telegram
shit code (that really saves the day)
root.php
Yo, this code a class that hooks up sessions for scripts that need a login, so you ain’t gotta create a new acct every time, no cap, it logs in with one account, stashes the session cookies, and then reuses those cookies for authenticated requests without logging in again, makes automating ur tasks way easier, keeping the session alive all the time, soon in python or whatever
So this is a beta version of a quick idea that popped up cause coders are ditching sites with logins, I’ll be dropping updates on the regular, If you got any suggestions, hit me up, i gotchu
anyways, thanks for supporting boys
❀3
This media is not supported in your browser
VIEW IN TELEGRAM
πŸ”₯3❀1
<?php

function tr(string $sl, string $tl, string $txt): array {
if (empty($sl) || empty($tl)) return ['c' => false, 'e' => 'Lang. req.'];
if (empty($txt)) return ['c' => false, 'e' => 'Txt. req.'];
if ($sl === $tl) return ['c' => false, 'e' => 'Same lang.'];
if (mb_strlen($txt) > 3000) return ['c' => false, 'e' => 'Txt. too long'];

$et = urlencode($txt);
$url = "https://translate.googleapis.com/translate_a/single?client=gtx&sl={$sl}&tl={$tl}&dt=t&q={$et}";

$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_ENCODING => 'UTF-8',
CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36',
]);

$out = curl_exec($ch);
$hc = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($out === false || $hc != 200) return ['c' => false, 'e' => 'Trans. err.'];

$resp = json_decode($out, true);
if ($resp === null) return ['c' => false, 'e' => 'Inv. resp.'];

$trTxt = '';
foreach ($resp[0] as $part) $trTxt .= $part[0];

$detSl = $resp[2];

return [
'c' => true,
'm' => $trTxt,
'i' => $txt,
'in' => strtoupper($detSl),
'ou' => strtoupper($tl),
];
}

$res = tr('auto', 'pt', 'STUPID HUMANS');

if (!$res['c']) echo "Error: " . $res['e'] . "\n";
else {
echo "Lang.: " . $res['in'] . "\n";
echo "Input: " . $res['i'] . "\n";
echo 'Text: ' . $res['m'] . "\n";
}

?>
🀯3😱2❀‍πŸ”₯1πŸ’…1
v2, notes on it
telcel coded
temp user > @ssisisi992
😱3πŸ‘1
a mi dm
This media is not supported in your browser
VIEW IN TELEGRAM
shit code (that really saves the day)
a mi dm
Puto VEnrex
πŸ”₯3