Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<?php
$handle = curl_init();
curl_setopt($handle, CURLOPT_FOLLOWLOCATION, true); //искаме да следва където и да ни препратят
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); //искаме да ни върне информацията
curl_setopt($handle, CURLOPT_POST, true); //ползваме POST
curl_setopt($handle, CURLOPT_POSTFIELDS, "login[usr]=bulftw&login[foo]=&login[pwd]=123123&login[submit]=Логин"); //слагаме си име и парола
curl_setopt($handle, CURLOPT_URL, "http://bgmafia.com/auth/login"); //задаваме URL за вписване
curl_setopt($handle, CURLOPT_COOKIEJAR, "/tmp/cookiez.txt"); //файла, където да записва бисквитките
curl_exec($handle); //изпълняваме заявката
curl_setopt($handle, CURLOPT_POST, false); //не искаме заявката да е POST
curl_setopt($handle, CURLOPT_URL, "http://bgmafia.com/gang"); //сменяме адреса
$output = curl_exec($handle);
curl_close($handle);
echo $output; //тук прайм 'кот си искаме
?>