We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 41204
    • 2 Posts

    http://www.govoridolgo.ru/ адрес ресурса, раздел красивые номера.
    там как то снипеты эти, короче только пока html и css освоил. Себе делаю сайт, осваиваюсь)))

    <?php

    //http://www.2255757.ru/numbers/numbers_1.php билайн
    //http://www.2255757.ru/numbers/numbers_2.php мегафон
    //http://www.2255757.ru/numbers/numbers_3.php мтс


    $orig_arr = array('МТС' => 'http://www.2255757.ru/numbers/numbers_3.php', 'Мегафон' => 'http://www.2255757.ru/numbers/numbers_2.php', 'Билайн' => 'http://www.2255757.ru/numbers/numbers_1.php');
    $arr = array();
    if (!isset($_REQUEST[s][5]) || $_REQUEST[s][5] == 4) {
    $arr = $orig_arr;
    } else {
    if ($_REQUEST[s][5] == 1) {$arr = array('Билайн' => 'http://www.2255757.ru/numbers/numbers_1.php'); }
    if ($_REQUEST[s][5] == 2) {$arr = array('Мегафон' => 'http://www.2255757.ru/numbers/numbers_2.php'); }
    if ($_REQUEST[s][5] == 3) {$arr = array('МТС' => 'http://www.2255757.ru/numbers/numbers_3.php'); }
    }
    // $pagelocation = "http://2255757.ru/numbers/numbers_3.php";

    $print_txt= '';


    foreach ($arr as $sys_id => $pagelocation){
    $file = file_get_contents($pagelocation);
    $file = unserialize(base64_decode($file));
    $name[1] = '<tr><td>Федеральных номеров нет</td></tr>';
    $name[2] = '<tr><td>Прямых номеров нет</td></tr>';
    $search = preg_replace("@[^0-9]+@i", '',$_REQUEST[s][0]);
    if(is_array($file) && count($file) != 0)
    foreach($file as $key => $_file):

    $number = preg_replace("@[^0-9/-]+@i", '', $_file[0]);
    $numberint = preg_replace("@[^0-9]+@i", '', $_file[0]);
    $cost = $_file[1];
    $tip_nomera = $_file[2];
    $vostanovlenie = $_file[3];
    $agentskie = $_file[4];
    $_c[$cost] = $cost;

    if($_REQUEST[s][1]!='' && $_REQUEST[s][2]!='' && $_REQUEST[s][1] <= $_REQUEST[s][2]):
    if($cost >= $_REQUEST[s][1] && $cost <=$_REQUEST[s][2]):
    $_cost[$cost] = $cost;
    endif;
    elseif($_REQUEST[s][1]!='' && $_REQUEST[s][2]==''):
    if($cost >= $_REQUEST[s][1]):
    $_cost[$cost] = $cost;
    endif;
    elseif($_REQUEST[s][1]=='' && $_REQUEST[s][2]!=''):
    if($cost <= $_REQUEST[s][2]):
    $_cost[$cost] = $cost;
    endif;
    else:
    $_cost[$cost] = $cost;
    endif;
    if($search!=''):
    if(strstr($numberint, $search)):
    $print_number[$cost][$tip_nomera][] = '
    <tr>
    <td>
    '.$number.'
    </td>
    <td>
    '.$cost.' руб.
    </td>
    <td>
    <a href="#" onclick=\'$("#msg").load("http://bonmenu.com.ua/tmp/core/main.php?n='.$number.'&p='.$cost.'").dialog({modal:true,title:"Заказать номер ('.$sys_id.') ",height:"530",width:"500"});return false;\' style="background-color:#FCC050;padding:2px;padding-left:10px;padding-right:10px;margin-bottom:2px;color:#000;font-weight:bold;font-size:12px;text-decoration:none;" class="rounded_border">Заказать ('.$sys_id.')</a>
    </td>
    </tr>
    ';
    endif;
    else:
    $print_number[$cost][$tip_nomera][] = '
    <tr>
    <td>
    '.$number.'
    </td>
    <td>
    '.$cost.' руб.
    </td>
    <td>
    <a href="#" onclick=\'$("#msg").load("http://bonmenu.com.ua/tmp/core/main.php?n='.$number.'&p='.$cost.'").dialog({modal:true,title:"Заказать номер ('.$sys_id.')",height:"530",width:"500"});return false;\' style="background-color:#FCC050;padding:2px;padding-left:10px;padding-right:10px;margin-bottom:2px;color:#000;font-weight:bold;font-size:12px;text-decoration:none;" class="rounded_border">Заказать ('.$sys_id.')</a>
    </td>
    </tr>
    ';
    endif;
    endforeach;

    if(is_array($_c)):
    ksort($_c);
    foreach($_c as $c):
    $m[1][$c] = '<option value="'.$c.'" '.($_REQUEST['s'][1] == $c ? 'selected' : '').'>'.$c.'</option>';
    $m[2][$c] = '<option value="'.$c.'" '.($_REQUEST['s'][2] == $c ? 'selected' : '').'>'.$c.'</option>';
    endforeach;
    endif;

    if(is_array($_cost)):
    ksort($_cost);
    foreach($_cost as $c):
    for($i='1';$i<3;$i++):
    if(is_array($print_number[$c][$i])):
    $print[$i][] = '
    <tr>
    <td colspan="3">
    <strong>По '.$c.' руб.</strong>
    </td>
    </tr>
    ';
    $print[$i][] = join("\n", $print_number[$c][$i]);
    endif;
    endfor;
    endforeach;
    endif;


    $print_txt .= '
    <div align="center">
    <form method="post" enctype="multipart/form-data">
    <table style="width:98%">
    <tr>
    <td align="center">
    <b>Поиск:</b>
    <input type="text" name="s[0]" value="'.$_REQUEST[s][0].'" style="width:200px;" />
    <SELECT name="s[4]" style="WIDTH:120px">
    <option value="">Все</option>
    <option value="1" '.($_REQUEST[s][4] == '1'? 'selected' : '').'>Федеральные</option>
    <option value="2" '.($_REQUEST[s][4] == '2'? 'selected' : '').'>Прямые</option>
    </SELECT>
    <SELECT name="s[5]" style="WIDTH:120px">
    <option value="4">Все операторы</option>
    <option value="3" '.($_REQUEST[s][5] == '3'? 'selected' : '').'>МТС</option>
    <option value="2" '.($_REQUEST[s][5] == '2'? 'selected' : '').'>Мегафон</option>
    <option value="1" '.($_REQUEST[s][5] == '1'? 'selected' : '').'>Билайн</option>
    </SELECT>
    </td>
    </tr>
    <tr>
    <td align="center">
    <b>По цене с: </b>
    <SELECT name="s[1]" style="WIDTH:100px">
    <option value="" ></option>
    '.(is_array($m[1]) ? join("\n",$m[1]) :'').'
    </SELECT>
    <b> по </b>
    <SELECT name="s[2]" style="WIDTH:100px">
    <option value="" ></option>
    '.(is_array($m[2]) ? join("\n",$m[2]) :'').'
    </SELECT>
    <input type="submit" name="push" value="Искать" />
    </td>
    </tr>
    </table>
    </form>
    </div>
    ';

    if (!isset($_REQUEST[s][5]) || $_REQUEST[s][5] == 4) {
    } else {
    $print_txt .= '<center><h2>Номера '.$sys_id.': </h2></center>';
    }




    $print_txt .= '



    <div align="center">
    <table style="width:98%">
    <tr>
    <td valign="top" align="center">
    ';
    if($_REQUEST[s][4] == '' || $_REQUEST[s][4] == '1')
    $print_txt .= '
    <table>
    '.(is_array($print[1])?join("\n", $print[1]):$name[1]).'
    </table>
    ';
    $print_txt .= '
    </td>
    <td valign="top" align="center">
    ';
    if($_REQUEST[s][4] == '' || $_REQUEST[s][4] == '2')
    $print_txt .= '
    <table>
    '.(is_array($print[2])?join("\n", $print[2]):$name[2]).'
    </table>
    ';
    $print_txt .= '
    </td>
    </tr>
    </table>
    </div>


    ';
    $print_number = array();
    }
    if(is_array($m))
    print($print_txt);
    ?>
      • 41204
      • 2 Posts
      Если у вас возникает такая проблема, то можно сделать следующее:

      нашел решение))))))

      1. Попробовать самостоятельно изменить это значение, добавив в самое начала index.php (рассположенного в корне сайта) следующие строчки:

      <?php ini_set("memory_limit", "32M"); ?>

      или же положив в корень сайта файл .htaccess следующего содержания:

      Код:
      php_value memory_limit 32M