Note: Alt system

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Note: Alt system

      Mission: modify - post transfer "Hide coordinates", "Hide technologies", "Hide Time" etc. for shahterov.net and warlogs.ru.

      Source Code

      1. function GetAltShahterov($strLog, $strRecycler, $strComment, $strUrl) {
      2. if ($strLog) {
      3. $strLog = str_replace ("'", '"', $strLog);
      4. $strLog = iconv("UTF-8", "WINDOWS-1251", $strLog);
      5. if ($strRecycler != "*") $strRecycler = iconv("UTF-8", "WINDOWS-1251", $strRecycler);
      6. else $strRecycler = "";
      7. $strComment = iconv("UTF-8", "WINDOWS-1251", $strComment);
      8. $postData = array (
      9. "log" => $strLog,
      10. "rep" => $strRecycler,
      11. "comment" => $strComment
      12. );
      13. $outPutDom = raidHtml($strUrl, $postData);
      14. $strUrl = $outPutDom->find('input');
      15. return $strUrl[0]->value;
      16. } else return false;
      17. }
      Display All

      Source Code

      1. function GetAltWarLogs($strLog, $strRecycler, $strComment, $strUrl) {
      2. if ($strLog) {
      3. $strLog = str_replace ("'", '"', $strLog);
      4. if ($strRecycler == "*") $strRecycler = "";
      5. $postData = array (
      6. "raw_html" => $strLog,
      7. "recyclers" => $strRecycler,
      8. "comment" => $strComment,
      9. "uni" => "1",
      10. "save_log" => "1"
      11. );
      12. $outPutDom = raidHtml($strUrl, $postData);
      13. $strUrl = $outPutDom->find('input');
      14. return $strUrl[4]->value;
      15. } else return false;
      16. }
      Display All


      Source Code

      1. function raidHtml($strUrl, $postData) {
      2. $ch = curl_init();
      3. curl_setopt($ch, CURLOPT_URL, $strUrl);
      4. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
      5. curl_setopt($ch, CURLOPT_POST, 1);
      6. curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
      7. $outPut = curl_exec($ch);
      8. curl_close($ch);
      9. $outPutDom = str_get_html($outPut);
      10. return $outPutDom;
      11. $outPutDom->clear();
      12. unset($outPutDom);
      13. }
      Display All