load(curl_exec($curl));
curl_close($curl);
return $dom;
}
//mycurl('https://www.cyber-warrior.org/Forum/default.asp?ForumID=0&AuthorID=232495')
function login($url,$data){
$fp=fopen("cookie.txt","w");
fclose($fp);
$login=curl_init();
curl_setopt($login,CURLOPT_COOKIEJAR, "cookie.txt");
curl_setopt($login,CURLOPT_COOKIEFILE, "cookie.txt");
curl_setopt($login,CURLOPT_URL,$url);
curl_setopt($login, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($login, CURLOPT_SSL_VERIFYHOST, false);
//curl_setopt($curl, CURLOPT_URL, "https://www.cyber-warrior.org/Forum/");
//curl_setopt($login, CURLOPT_REFERER, "https://www.cyber-warrior.org/Forum");
curl_setopt($login, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($login,CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($login,CURLOPT_POST, TRUE);
curl_setopt($login,CURLOPT_POSTFIELDS, $data);
ob_start();
return curl_exec($login);
ob_end_clean();
curl_close($login);
unset($login);
}
//echo login("https://www.cyber-warrior.org/Forum/login_user.asp","name=C%F6laslan%FD&password=Beybaba98&g-recaptcha-response=03AGdBq25fL0XFBO7aM1g3k_iTX-z-qjtRl8NztuejYU-tvu1mKoMKnAlJmVNSsPcd2NyerLTzxqmgdYTrKMheIZtbYJngqC_om6L7ikyrVeKULCtKFxQOzADI8xOEat3JZHRmsDoJtRCLJZnzPVz7ZRP4RGTWYaMf9GybsaX7lbB4aNsWG-YDiKOq304zg9l_iFI5Tf9AX3UfQ-ZI64pFHULNarVajX_v54JStP8yaB4CIL0eSd2MfHKmqIAfitDC4emoM7svpdXG_b81FHw3MNopt2ZmluFQfm004f7CgkZdbJV8g8p81CbpukWGcjkFNAErvIjsaI1wsTtJAwTCMbGTk87M-CZV4yDIBdS_vwb34ac_frUl2A4CeW-9gNgsNb8uXxfhuLKvI_QAt8iu9-nJsjON1gWxiAO1Liy61WInZ1grkPWTE4MJ_fsNU9wu6Q3o19y7_Rw26A3YVjx7jpCPneKNIjFZyg&Nerden=Forum&AutoLogin=1");
function deneme($url,$headers){
$login=curl_init();
curl_setopt($login,CURLOPT_COOKIEJAR, "cookie.txt");
curl_setopt($login,CURLOPT_URL,$url);
curl_setopt($login, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($login, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($login, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($login, CURLOPT_HTTPHEADER, $headers);
$result= curl_exec($login);
curl_close($login);
echo $result;
}
echo deneme('https://www.cyber-warrior.org/Forum/',$headers);
*/
$headers= [
'authority: www.cyber-warrior.org',
'method: GET',
'path: /Forum/default.asp?ForumID=0&AuthorID=232495',
'scheme: https',
'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,* /*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'accept-encoding: gzip, deflate, br',
'accept-language: en-US,en;q=0.9,tr;q=0.8',
'cache-control: max-age=0',
'cookie: __cfduid=d33ff257a98a325bd7c44213da4f67fef1613491216; __utmz=14415653.1613926854.14.5.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); ASPSESSIONIDSADRTSTQ=FEEBPKKCKANAFCCDPAEGFGFL; __utma=14415653.675644404.1613558509.1614120704.1614639044.20; __utmc=14415653; PrForum=; ASPSESSIONIDCCBAACCB=FJINBJLCLFHHFFPBMMBDJJLB; Forum=AuthorID=232495&UserID=gtnhqxmlS13489345946496%2B221%29%5Dm%5Bbkaja7%FF83888SXldb%60jhwcl; ForumVisit=LastVist=44257%2C1332523148',
'dnt: 1',
'referer: https://www.cyber-warrior.org/Forum/login_user.asp',
'sec-fetch-dest: document',
'sec-fetch-mode: navigate',
'sec-fetch-site: same-origin',
'sec-fetch-user: ?1',
'upgrade-insecure-requests: 1',
'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36'
];
//$useragent = $_SERVER['HTTP_USER_AGENT'];
//https://cyber-warrior.org/Forum/Ajax1433/aktifkonular.xml
# create a cURL handle
$ch = curl_init();
# set the URL (this could also be passed to curl_init() if desired)
curl_setopt($ch, CURLOPT_URL, "https://www.cyber-warrior.org/Forum/");
# set the HTTP method to POST
curl_setopt($ch, CURLOPT_POST, true);
# setting this option to an empty string enables cookie handling
# but does not load cookies from a file
curl_setopt($ch, CURLOPT_COOKIEFILE, "cyber-warrior.org_cookies.txt");
# set the values to be sent
curl_setopt($ch, CURLOPT_POSTFIELDS, array(
"username"=>"xxx",
"password"=>"xxx",
));
# return the response body
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
# send the request
$result = curl_exec($ch);
echo $result;
cur
?>