Error_reporting (0 );
Session_start ();
Require ("config. php ");
If (! Is_dir ("temp "))
{
Mkdir ("temp", 0777 );
}
$ C = tempnam ("temp", "c ");
$ Url = DZ. "logging. php? Action = login ";
$ Ch = curl_init ();
Curl_setopt ($ ch, CURLOPT_URL, $ url );
Curl_setopt ($ ch, CURLOPT_USERAGENT, $ _ SERVER ["HTTP_USER_AGENT"]);
Curl_setopt ($ ch, CURLOPT_COOKIEJAR, $ c );
Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1 );
$ Html = curl_exec ($ ch );
Preg_match ("/(? <= Charset = ).*? (? = ")/", $ Html, $ charset );
If ($ charset [0]! = "UTF-8 ")
{
$ Html = iconv ($ charset [0], "UTF-8", $ html );
}
Curl_close ($ ch );
Preg_match ("/(? <= Formhash "value = ").*? (? = ")/", $ Html, $ outs );
$ _ SESSION ["hash"] = $ outs [0];
$ C1 = tempnam ("temp", "c1 ");
$ Re_url = DZ. "ajax. php? Action = updateseccode & secchecktype = & inajax = 1 & ajaxtarget = seccodeverify_menu ";
$ Ch = curl_init ();
Curl_setopt ($ ch, CURLOPT_URL, $ re_url );
Curl_setopt ($ ch, CURLOPT_USERAGENT, $ _ SERVER ["HTTP_USER_AGENT"]);
Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1 );
Curl_setopt ($ ch, CURLOPT_COOKIEFILE, $ c );
Curl_setopt ($ ch, CURLOPT_COOKIEJAR, $ c1 );
$ Html = curl_exec ($ ch );
Curl_close ($ ch );
Preg_match ("/(? <= Src = ").*? (? = ")/", $ Html, $ outs );
$ _ SESSION ["cookie_jar"] = tempnam ("temp", "C1 _");
$ Url = DZ. $ outs [0];
$ Ch = curl_init ();
Curl_setopt ($ ch, CURLOPT_REFERER, $ re_url );
Curl_setopt ($ ch, CURLOPT_URL, $ url );
Curl_setopt ($ ch, CURLOPT_USERAGENT, $ _ SERVER ["HTTP_USER_AGENT"]);
Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1 );
Curl_setopt ($ ch, CURLOPT_COOKIEFILE, $ c1 );
Curl_setopt ($ ch, CURLOPT_COOKIEJAR, $ _ SESSION ["cookie_jar"]);
$ Html = curl_exec ($ ch );
Curl_close ($ ch );
Echo $ html;