Mission: modify - post transfer "Hide coordinates", "Hide technologies", "Hide Time" etc. for shahterov.net and warlogs.ru.
Display All
Display All
Display All
Source Code
- function GetAltShahterov($strLog, $strRecycler, $strComment, $strUrl) {
- if ($strLog) {
- $strLog = str_replace ("'", '"', $strLog);
- $strLog = iconv("UTF-8", "WINDOWS-1251", $strLog);
- if ($strRecycler != "*") $strRecycler = iconv("UTF-8", "WINDOWS-1251", $strRecycler);
- else $strRecycler = "";
- $strComment = iconv("UTF-8", "WINDOWS-1251", $strComment);
- $postData = array (
- "log" => $strLog,
- "rep" => $strRecycler,
- "comment" => $strComment
- );
- $outPutDom = raidHtml($strUrl, $postData);
- $strUrl = $outPutDom->find('input');
- return $strUrl[0]->value;
- } else return false;
- }
Source Code
- function GetAltWarLogs($strLog, $strRecycler, $strComment, $strUrl) {
- if ($strLog) {
- $strLog = str_replace ("'", '"', $strLog);
- if ($strRecycler == "*") $strRecycler = "";
- $postData = array (
- "raw_html" => $strLog,
- "recyclers" => $strRecycler,
- "comment" => $strComment,
- "uni" => "1",
- "save_log" => "1"
- );
- $outPutDom = raidHtml($strUrl, $postData);
- $strUrl = $outPutDom->find('input');
- return $strUrl[4]->value;
- } else return false;
- }
Source Code
- function raidHtml($strUrl, $postData) {
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $strUrl);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
- $outPut = curl_exec($ch);
- curl_close($ch);
- $outPutDom = str_get_html($outPut);
- return $outPutDom;
- $outPutDom->clear();
- unset($outPutDom);
- }