1. Лучший говнокод

    В номинации:
    За время:
  2. PHP / Говнокод #1679

    +161

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    $id_country = 0;
    $id_region = 0;
    $id_city = 0;
    $zip_code = 0;
    if(isset($_REQUEST["id_country"]))
    {
        $id_country=$_REQUEST["id_country"];
    }
    if(isset($_REQUEST["id_region"]))
    {
        $id_region=$_REQUEST["id_region"];
    }
    if(isset($_REQUEST["id_city"]))
    {
        $id_city=$_REQUEST["id_city"];
    }
    if(isset($_REQUEST["zip_code"]))//проверка zip кода
    {
        $zip_code=$_REQUEST["zip_code"];
    }
    
    $id_country=strip_tags(trim(strval($_REQUEST["id_country"])));
    $id_region=strip_tags(trim(strval($_REQUEST["id_region"])));
    $id_city=strip_tags(trim(strval($_REQUEST["id_city"])));
    $zip_code=strip_tags(trim(strval($_REQUEST["zip_code"])));
    
    ..........................
    //переходим на Шаг 2 решистрации
    header("location: ./registration.php?sel=2");
    ..........................

    Индусы среди нас!

    Bartelby, 25 Августа 2009

    Комментарии (22)
  3. PHP / Говнокод #1500

    +157.1

    1. 1
    return strtoupper(strtr($str, "йцукенгшщзхъэждлорпавыфячсмитьбюё", "ЙЦУКЕНГШЩЗХЪЭЖДЛОРПАВЫФЯЧСМИТЬБЮЁ"));

    1C-Bitrix, вот говнищще-то!

    xEviL, 10 Августа 2009

    Комментарии (22)
  4. C# / Говнокод #1489

    +142.4

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    public enum Month
      {
        Января = 1,
        Февраля = 2,
        Марта = 3,
        Апреля = 4,
        Мая = 5,
        Июня = 6,
        Июля = 7,
        Августа = 8,
        Сентября = 9,
        Октября = 10,
        Ноября = 11,
        Декабря = 12
      } 
    
    // Использование
    m_date.Text = t.Day + " " + ((Month) t.Month) + " " + t.Year;

    Одноразовый енум

    guest, 07 Августа 2009

    Комментарии (22)
  5. JavaScript / Говнокод #683

    +228.7

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    var pas="WebKill";
    
    function proverka() {
    
    var upas=document.wk.userpas.value;
    if(upas==pas) {
      location.href="dnevnik_webkill'a.html";
    }
    else { 
    alert('Тебе сюда нельзя!');
    }
    
    }

    Хацкер блин =/

    guest, 07 Марта 2009

    Комментарии (22)
  6. PHP / Говнокод #394

    +152.1

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    <?php
    if(!($str===$str2)) {
    	#ибо !=== не существует (с)Денис Колисниченко - книга "Самоучитель PHP 5"
    }
    ?>

    Не покупайте эту книгу =\

    guest, 14 Января 2009

    Комментарии (22)
  7. JavaScript / Говнокод #258

    +430

    1. 1
    2. 2
    3. 3
    4. 4
    function showThisDamnDiv(damnDiv,damnImage) {
    var name = navigator.appName; 
    if (name == "Microsoft Internet Explorer") {  // тваюмать
    ...

    guest, 24 Декабря 2008

    Комментарии (22)
  8. PHP / Говнокод #29236

    +1

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    <? // get current season for header styling
    		$current_month = date("m");
    		if($current_month >= "03" && $current_month <= "05") $season = "spring";
    		elseif($current_month >= "06" && $current_month <= "08") $season = "spring";
    		elseif($current_month >= "09" && $current_month <= "11") $season = "autumn";
    		else $season = "winter";
      ?>

    И про теги в стиле говноБитрикса не забыли

    Lexchz2, 25 Февраля 2026

    Комментарии (21)
  9. Си / Говнокод #29119

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    void rtm_guard(void) {
        /*
            Don't even try to MS VC that stuff, zerobuffy 4eyes.
        */
        unsigned char buf0[0];
        unsigned a = 0xF001BA11;
        unsigned b = 0xF001BA11;
        unsigned c = 0x55550000;
        unsigned d = 0xF001BA11;
        unsigned e = 0xF001BA11;
        unsigned char buf1[0];
        ptrdiff_t diff = buf0 - buf1;
    
        const char* prnt;
        switch (diff) {
            case sizeof rtm_guard:
                prnt = "dear Nizhny Novgorod '-O1' lover";
                break;
            case sizeof (int):
                prnt = "'gcc -O0' bastard";
                break;
            default:
                prnt = "\b";
        };
    
        (diff == sizeof (int) || diff == sizeof rtm_guard) ?
        fprintf(stderr, "%s%s%s", 
                    "Hey you, ", prnt, ", what the hell are you trying to bang here w/o mandatory flags? Forgot something? \n"), abort() : 
        0;
    }

    Сodebomb в рантайме наложил. Но нафига? Присосаться хуком и послать курить джуника с лидом как рукопожато билдить?

    BCHARa, 08 Апреля 2025

    Комментарии (21)
  10. C++ / Говнокод #28908

    0

    1. 1
    2. 2
    3. 3
    4. 4
    int main(int Argcina, char** Argvina) {
        int tse_odna_strana_dlya_vseh = (char**)Argcina - Argvina;
        return 0;
    }

    Milochocientos, 16 Января 2024

    Комментарии (21)
  11. PHP / Говнокод #28902

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    <?php
    
    $domains = [
    'edge-star-shv-%s-%s.facebook.com',      /* edge-chat.facebook.com, graph.facebook.com, mbasic.facebook.com, touch.facebook.com */ 
    'instagram-p42-shv-%s-%s.fbcdn.net',     /* www.instagram.com, b.i.instagram.com */
    'edge-sonar-mini-shv-%s-%s.fbcdn.net',   /* не знаю, для чего нужны edge-sonar-mini */
    'edge-star-mini-shv-%s-%s.facebook.com', /* www.facebook.com, m.facebook.com, fb.com */
    'instagram-p3-shv-%s-%s.fbcdn.net',      /* api.instagram.com, i.instagram.com, l.instagram.com, graph.instagram.com, edge-chat.instagram.com, */
                                             /* static.cdninstagram.com, scontent-hel3-1.cdninstagram.com, scontent.cdninstagram.com, */
                                             /* threads.net, www.threads.net */
    'xx-fbcdn-shv-%s-%s.fbcdn.net',          /* scontent-hel3-1.xx.fbcdn.net, static.xx.fbcdn.net, connect.facebook.net, scontent.xx.fbcdn.net */
    'edge-dgw-shv-%s-%s.facebook.com'        /* gateway.facebook.com, gateway.instagram.com, gateway.threads.net */
    ];
    
    $suffices = explode(',', 'akl1,ams2,ams4,arn2,atl3,bcn1,bkk1,bog1,bog2,bom1,bom2,bos5,bru2,ccu1,cdg4,cgk1,cph2,cpt1,del1,del2,den2,den4,dfw5,dub4,dus1,eze1,fco2,for1,fra3,fra5,gig4,gru1,gru2,ham3,hel3,hkg1,hkg4,hou1,hyd1,iad3,jnb1,jnb2,kul2,kul3,lax3,lga3,lhr6,lhr8,lim1,lis1,los2,maa2,mad1,mad2,man2,mct1,mia3,mnl1,mrs2,msp1,muc2,mxp1,mxp2,nrt1,ord5,otp1,pmo1,pnq1,prg1,qro1,scl2,sea1,sin6,sjc3,sof1,syd2,tpe1,vie1,waw1,xsp1,zrh1');
    
    foreach ($domains as $domain) {
      foreach (['01','02','03','04'] as $index) {
        foreach ($suffices as $suffix) {
            $url = sprintf($domain, $index, $suffix);
            $raw = gethostbynamel($url);
            if(!is_array($raw)) continue;
            $ips = implode(',', $raw);
            echo $ips,' ', $url, PHP_EOL;
        }
      }
    }

    Получение списка IP-адресов, используемых сервисами Ф*к, И*м и Threads.

    Myxa, 13 Января 2024

    Комментарии (21)