PHP.SU

Программирование на PHP, MySQL и другие веб-технологии
PHP.SU Портал     На главную страницу форума Главная     Помощь Помощь     Поиск Поиск     Поиск Яндекс Поиск Яндекс     Вакансии  Пользователи Пользователи

Страниц (6): « 1 2 3 4 [5] 6 »

> Найдено сообщений: 86
tgcoin Отправлено: 08 Января, 2012 - 16:57:48 • Тема: помогите сделать для сервиса счётчиков тиц и pr сделать зону рф • Форум: Напишите за меня, пожалуйста

Ответов: 5
Просмотров: 222
вот мой сайт http://e-root[dot]ru/ дело в том что когда вожу адрес правительство.рф
он пишет ошибку якобы домены такого нет ранее было найдено такие ссылки от рф
http://xn--80aealotwbjpid2k[dot]xn--p1ai/ это и есть правительство.рф
http://xn--80aealotwbjpid2k[dot]xn--p1ai/ такие ссылки я запретил надо сделать
чтобы выдавал счётчики рф зонам спасибо за помощь вот скрипт
CODE (htmlphp):
скопировать код в буфер обмена
  1.  
  2. <?
  3. include_once ("includes/config.php");
  4. include_once ("includes/func.php");
  5. include_once ("includes/conf_cypr.php");
  6. if(isset($_GET['step']) && $_GET['step']==2 AND $_POST['domain']){
  7.  
  8. $url = htmlspecialchars(mysql_real_escape_string($_POST['domain']));
  9. $url = cleanInput($url);
  10. $headers = @get_headers('http://'.$url);
  11. }
  12.  
  13.  
  14. include_once ("includes/header.php");
  15. ?>
  16.  
  17. <?
  18. $domain = "http://e-root.ru/";
  19. $alt = "Счетчик тИЦ и PR";
  20. if(isset($_GET['step']) && $_GET['step']==2)
  21. {
  22. if(!isset($_POST['domain']) or $_POST['domain']==NULL){
  23. print "<h1>Информер для сайта</h1>Вы не ввели адрес айта<br><br> Пример Домена - <u>domain.ru</u> <br><br> <a href='index.php'>Вернуться назад на главную и ввести адрес</a>.";
  24.    include_once ("includes/footer.php");
  25.    exit();
  26. }
  27. $rf=strtolower(substr($url,strlen($url)-9,strlen($url)));
  28.  
  29. if(!preg_match("/([-a-zA-Z0-9])+/m", $url) OR $rf==".xn--p1ai"){
  30.    print "<h1>Информер для сайта</h1>Формат адреса неверный <br><br> Пример Домена - <u>domain.ru</u> <br><br> <a href='javascript:
  31. history.go(-1)'>Вернуться Назад</a>.";
  32.    include_once ("includes/footer.php");
  33.    exit();
  34. }
  35.  
  36.  
  37.  
  38. if (!$headers)
  39. {
  40.    print "<h1>Информер для сайта</h1>Указан не существующий домен <br><br> Пример Домена - <u>domain.ru</u> <br><br> <a
  41. href='javascript:history.go(-1)'>Вернуться Назад</a>.";  
  42.   include_once ("includes/footer.php");
  43.   exit();
  44. }
  45.  
  46.  
  47.  
  48. if (preg_match("/([-a-zA-Z0-9]{1,63})([\.]{1})([a-zA-Z]{1,10})/m", $url) or preg_match("/([w]{1,3})([\.]{1})([-a-zA-Z0-9]{1,63})([\.]{1})([a-zA-Z]{1,10})/m",
  49.  
  50. $url) or preg_match("/([-a-zA-Z0-9]{1,63})([\.]{1})([-a-zA-Z0-9]{1,63})([\.]{1})([a-zA-Z]{1,10})/m", $url))
  51.        {
  52.                print "<h1>Выбор кнопки</h1>";
  53.                print "Итак, адрес сайта, введенный Вами - <a target=\"_blank\" href='http://$url'>$url</a><br /><br />";
  54.                print "Выберите понравившийся дизайн кнопки информера и получите код для установки на сайт.<br /><br />";
  55.              
  56.                print "
  57. <form action='index.php?step=3' method='post' name='getcode' >
  58. <fieldset>
  59. <legend>&nbsp;<strong>тИЦ и PR&nbsp;</strong>&nbsp;</legend>
  60. &nbsp;&nbsp;";
  61. ?>
  62. <?
  63. //получаем переменные
  64. extract($_GET);
  65.  
  66. // обрезаем ненужности в виде www и http://
  67. $url=str_replace("www.","",$url);
  68. $url=str_replace("http://","",$url);
  69.  
  70. // функция вычисления ТИц с Яндекс.Бара
  71. function getCY($_url) {
  72. $_uri = "http://bar-navig.yandex.ru/u?ver=2&url=".urlencode("http://".$_url)."&show=1";
  73. $fd = @fopen($_uri, "r");
  74. if ($fd) {
  75.   while ($buffer = fgets($fd, 4096)) $haystack.=$buffer;
  76.   fclose($fd);
  77.   preg_match("/<tcy rang=\"(.*)\" value=\"(.*)\"\/>/isU", $haystack,$cy);
  78.   return $cy[2];
  79.  
  80. } else return 0;
  81. }
  82.  
  83.  
  84. //Вывод тИЦ на экран
  85.  
  86. $tic=intval(getCY($url));
  87.  
  88.  
  89. echo '<div class=result>';
  90. echo "&nbsp;Анализ сайта: <a href=http://".$url." target=_blank>".htmlspecialchars($url)."</a><br>";
  91. echo "&nbsp;Яндекс тИЦ: ".$tic."<br>";
  92. echo "&nbsp;Google PR: ".intval(get_pr($url));
  93. echo '</div>';
  94.  
  95. ?>
  96. <?
  97. print "<br /></fieldset>
  98. <fieldset>
  99. <legend>&nbsp;<strong>Информеры для сайтов 88x15&nbsp;</strong>&nbsp;</legend>&nbsp;&nbsp;
  100. <input type='radio' name='button' value='11-1' checked='checked' />&nbsp;<img src='button.php?url=$url&type=11' border='0' width='88' height='15'
  101. alt='Счетчик тИЦ и PR' align='absmiddle' />
  102. <input type='radio' name='button' value='16-1' />&nbsp;<img src='button.php?url=$url&type=16' border='0' width='88' height='15' alt='Счетчик тИЦ и
  103. PR' align='absmiddle' />
  104. <br /></fieldset>
  105. <fieldset>
  106. <legend>&nbsp;<strong>Информеры для сайтов 88x31&nbsp;</strong>&nbsp;</legend>&nbsp;&nbsp;
  107. <input type='radio' name='button' value='2-2' />&nbsp;<img src='button.php?url=$url&type=2' border='0' width='88' height='31' alt='Счетчик тИЦ и
  108. PR' align='absmiddle' />
  109. <input type='radio' name='button' value='6-2' />&nbsp;<img src='button.php?url=$url&type=6' border='0' width='88' height='31' alt='Счетчик тИЦ и
  110. PR' align='absmiddle' />
  111. <input type='radio' name='button' value='7-2' />&nbsp;<img src='button.php?url=$url&type=7' border='0' width='88' height='31' alt='Счетчик тИЦ и
  112. PR' align='absmiddle' />
  113. <input type='radio' name='button' value='8-2' />&nbsp;<img src='button.php?url=$url&type=8' border='0' width='88' height='31' alt='Счетчик тИЦ и
  114. PR' align='absmiddle' />
  115. <input type='radio' name='button' value='22-2' />&nbsp;<img src='button.php?url=$url&type=22' border='0' width='88' height='31' alt='Счетчик тИЦ и
  116. PR' align='absmiddle' />
  117. <input type='radio' name='button' value='9-2' />&nbsp;<img src='button.php?url=$url&type=9' border='0' width='88' height='31' alt='Счетчик тИЦ и
  118. PR' align='absmiddle' />
  119. <br /></fieldset>
  120. <input type='hidden' name='domain' value='$url' /><br>
  121. <input type='submit' name='goGetCode' value='Получить код' />
  122. </form>";
  123.        }
  124.        else
  125.        {
  126.                print "<h1>Информер для сайта</h1>Формат адреса неверный <br><br> Пример Домена - <u>domain.ru</u> <br><br> <a
  127. href='javascript: history.go(-1)'>Вернуться Назад</a>.";
  128.        }
  129. include_once ("includes/footer.php");
  130. exit();
  131. }
  132.  
  133.  
  134. if(isset($_GET['step']) && $_GET['step']==3)
  135. {
  136. if(!isset($_POST['domain']) or $_POST['domain']==NULL){
  137. print "<h1>Информер для сайта</h1>Вы не ввели адрес айта<br><br> Пример Домена - <u>domain.ru</u> <br><br> <a href='index.php'>Вернуться назад на главную и ввести адрес</a>.";
  138.    include_once ("includes/footer.php");
  139.    exit();
  140. }
  141. // Выдача кода информера или печать ошибки
  142. if(!empty($_POST['goGetCode']) && (int)$_POST['button']!="")
  143.        {
  144.        $url = $_POST['domain']; $url = trim(htmlspecialchars(strtolower($url))); $url = cleanInput($url);
  145.        $type = $_POST['button']; $type = trim(htmlspecialchars(strtolower($type))); $type = cleanInput($type);
  146.      
  147.        $button_size = explode("-",$type);
  148.        $t = $button_size[0];
  149.        if($button_size[1]==1) {$width = '88'; $height = '15';}
  150.        if($button_size[1]==2) {$width = '88'; $height = '31';}
  151.        if($button_size[1]==3) {$width = '88'; $height = '15';} // new
  152.      
  153.        print "<h1>Код кнопки</h1>
  154. Вы выбрали следующий дизайн информера:
  155. &nbsp;&nbsp;<img src=\"button.php?url=$url&type=$t\" border=\"0\" width=\"$width\" height=\"$height\" alt=\"$alt\" align=\"absmiddle\" /></p><p
  156. class=\"text_article\">При использовании нашего сервиса информеров запрещается любое изменение кода. В противном случае, мы будем
  157. вынуждены удалить ваш сайт из сервиса или заблокировать его на совсем.<br /><br />Вставьте следующий код в удобное место на вашем
  158. сайте:<br /><textarea name='codeimg' rows='6' cols='51' onclick='this.select()'>
  159. <a href=\"".$domain."\" target=\"_blank\"><img src=\"".$domain."button.php?url=$url&type=$t\" border=\"0\" width=\"$width\" height=\"$height\"
  160. alt=\"$alt\" /></a></textarea><br />Если вы хотите выбрать другой дизайн кнопки, нажмите <a href='javascript: history.go(-1)'>Вернуться
  161. Назад</a>.<br /><br />";
  162.        include_once ("includes/footer.php");
  163.        exit();
  164.        }
  165. }
  166.  
  167. ?>
  168. <h1>Яндекс тиц и Google pr</h1>
  169. <form method="post" action="index.php?step=2" id="mainform">
  170. <input type="text" name="domain" id="search-field" class="textfield" value="" /><input type="image" class="img-btn" src="img/checkbut.gif"
  171.  
  172. alt="Получить" />
  173. </form>
  174. <p id="searchtip">Например, domain.ru или www.domain.ru <br /><br /></p></div>
  175. <hr>
  176. <br>
  177. <center>
  178. <a target="_blank" href="http://hostia.ru/billing/host.php?uid=13833&bid=11"><img border="0" src="http://hostia.ru/banner/6.gif" width="468"
  179.  
  180. height="60" alt="Хостинг от 0,9$. Трафик неограничен."></a>
  181. </center>
  182. <div id="help_main">
  183. </div>
  184.  
  185. <div id="bookmarks">
  186. <center>
  187. <? $url_book = "".$_SERVER['REQUEST_URI']; ?>
  188. </center>
  189. </div>
  190.  
  191. <?
  192. include_once ("includes/footer.php");
  193. ?>
  194.  
tgcoin Отправлено: 06 Января, 2012 - 06:52:14 • Тема: проблема при добавления сайта • Форум: Напишите за меня, пожалуйста

Ответов: 4
Просмотров: 151
как исправить
и DITA если не понимаешь вопроса зачем что то писать я написал всё что мне надо
если ты помочь не сможешь зачем писать?
tgcoin Отправлено: 06 Января, 2012 - 00:05:23 • Тема: проблема при добавления сайта • Форум: Напишите за меня, пожалуйста

Ответов: 4
Просмотров: 151
смотрите вот мой сайт http://e-root[dot]ru/
там просят например вести домен domain.ru а можно вводить domain.ruad
тоесть вы поняли что домена в зоне .ruad нет
пример http://e-root[dot]ru/button.php?url=[dot][dot][dot]in[dot]ru&type=8
какой код надо index.php или booton.php
tgcoin Отправлено: 03 Января, 2012 - 21:48:44 • Тема: помогите исправить ошибки • Форум: Напишите за меня, пожалуйста

Ответов: 6
Просмотров: 184
нужен фильтр на входящие параметры
вот код
$a[0] = $_GET['url'];
tgcoin Отправлено: 03 Января, 2012 - 19:47:12 • Тема: помогите исправить ошибки • Форум: Напишите за меня, пожалуйста

Ответов: 6
Просмотров: 184
http://e-root[dot]ru/button.php?url=[dot][dot][dot]E0%F5&type=1

вот посмотрите как исправить
tgcoin Отправлено: 03 Января, 2012 - 18:27:58 • Тема: помогите исправить ошибки • Форум: Напишите за меня, пожалуйста

Ответов: 6
Просмотров: 184
вот друг скинул ссылки говорит баг в скрипте помогите найти и исправить

http://e-root[dot]ru/button.php?url=[dot][dot][dot]E0%F5&type=1

http://e-root[dot]ru/button.php?url=[dot][dot][dot]h3%3E&type=8

вот код
CODE (htmlphp):
скопировать код в буфер обмена
  1.  
  2. <?php
  3. include_once ("includes/config.php");
  4. include_once ("includes/func.php");
  5. include_once ("includes/conf_cypr.php");
  6. function error_pic88x31($error,$error2,$left,$left2,$top)
  7. {
  8. header ("Content-type: image/gif");
  9. $im = @ImageCreate(88, 31);
  10. $y=ImageColorAllocate($im,240,0,0);
  11. $b=ImageColorAllocate($im,50,50,50);
  12. imagefill($im, 0, 0, ImageColorAllocate($im, $bg1[0], $bg1[1], $bg1[2]));
  13.  
  14. imagerectangle($im, 0, 0, 87, 30, $y);
  15. $font=3;
  16. imagestring ($im, $font, $left, $top, $error, $y);
  17. if($error2!="") {imagestring ($im, $font, $left2, $top+11, $error2, $y);}
  18. imagegif($im);
  19.  
  20. function error_pic88x15($error,$left,$top)
  21. {
  22. header ("Content-type: image/gif");
  23. $im = @ImageCreate(88, 15);
  24. $y=ImageColorAllocate($im,240,0,0);
  25.  
  26. $b=ImageColorAllocate($im,50,50,50);
  27.  
  28. imagefill($im, 0, 0, ImageColorAllocate($im, $bg1[0], $bg1[1], $bg1[2]));
  29.  
  30. imagerectangle($im, 0, 0, 87, 14, $y);
  31. $font=3;
  32. imagestring ($im, $font, $left, $top, $error, $y);
  33. imagegif($im);
  34.  
  35. $a[0] = $_GET['url'];
  36.  
  37. if (preg_match("/^(http:\/\/)?([^\/]+)/i", $a[0], $matches)) {
  38.         $url=strtolower($matches[2]);
  39.         } else exit(1);
  40.  
  41. $link=mysql_connect("localhost", $cypr_db_login, $cypr_db_passw) or exit(1);
  42. mysql_select_db($cypr_db_bd) or exit(1);
  43.  
  44. mysql_query("CREATE TABLE IF NOT EXISTS `".$cypr_table."` (`url` VARCHAR(255) NOT NULL, `dte` DATE NOT NULL, ".
  45.                         "`pr` INT(5) NOT NULL, `cy` INT(5) NOT NULL, `wr` INT(5) NOT NULL, `wtr` INT(5) NOT NULL, `referer` VARCHAR(255), `switch` INT(1))") or die("Query failed : " . mysql_error());
  46.  
  47. $result=mysql_query("SELECT url, DATE_FORMAT(dte, \"%y-%m-%d\") as dte, DATE_FORMAT(NOW(), \"%y-%m-%d\") as now, pr, cy, wr, wtr, switch FROM ".$cypr_table.
  48.                 " WHERE (url=\"".$url."\")") or die("Query failed : " . mysql_error());
  49.  
  50. $arr=mysql_fetch_array($result);
  51. if (isset($arr[url])) {
  52.         if ($arr[dte]!=$arr[now]) {
  53.                 $prget = get_pr($url);
  54.                 $cyget = getYA($url);
  55.                 $webaltaget = 0;
  56.                
  57.                 $pr=0+$prget; if ($pr==0) {$prget1 = get_pr($url); $pr=0+$prget1;}
  58.                 $cy=0+$cyget[0]; if ($cy==0) {$cyget1 = getYA($url); $cy=0+$cyget1[0];}
  59.                 $wr=0; $wtr=0;
  60.  
  61.                 $switch = $arr['switch'];
  62.                 mysql_query("UPDATE ".$cypr_table." SET dte=NOW(), pr=$pr, cy=$cy, wr=$wr, wtr=$wtr, referer=\"$HTTP_REFERER\", switch=$switch WHERE (url=\"$url\")");
  63.                 } else {
  64.                 $pr=$arr[pr];
  65.                 $cy=$arr[cy];
  66.                 $wr=$arr[wr];
  67.                 $wtr=$arr[wtr];
  68.                 }
  69.         } else {
  70.         $prget1 = get_pr($url);
  71.         $cyget1 = getYA($url);
  72.         $webaltaget = 0;
  73.                
  74.         $pr=0+$prget1; if ($pr==0) {$prget2 = get_pr($url); $pr=0+$prget2;}
  75.         $cy=0+$cyget1[0]; if ($cy==0) {$cyget2 = getYA($url); $cy=0+$cyget2[0];}
  76.         $wr=0; $wtr=0;
  77.        
  78.         mysql_query("INSERT INTO ".$cypr_table." VALUES (\"$url\", NOW(), $pr, $cy, $wr, $wtr, \"$HTTP_REFERER\", 1)");
  79.         }
  80. $query = mysql_query("SELECT url, switch, referer FROM ".$cypr_table." WHERE (url=\"".$url."\")") or die("Query failed : " . mysql_error());
  81. $q = mysql_fetch_array($query);
  82. mysql_close($link);
  83.  
  84. if(isset($_GET['type']))
  85. {
  86.  
  87. $blackArr = array("http://domain.ru");
  88.  
  89. for($i=0;$i<count($blackArr);$i++)
  90.         {
  91.         $checkBL = strpos($q['referer'],$blackArr[$i]);
  92.         if(is_integer($checkBL))
  93.                 {
  94.                 if($_GET['type']!=11 && $_GET['type']!=12 && $_GET['type']!=13 && $_GET['type']!=15 && $_GET['type']!=16 && $_GET['type']!=17 && $_GET['type']!=3)
  95.                         {error_pic88x31("Site is","blocked",8,30,3);}
  96.                         else
  97.                         {error_pic88x15("Blocked site",2,1);}
  98.                 }
  99.         }
  100.  
  101. if($q['switch']==0)
  102.         {
  103.         if($_GET['type']!=11 && $_GET['type']!=12 && $_GET['type']!=13 && $_GET['type']!=15 && $_GET['type']!=16 && $_GET['type']!=17 && $_GET['type']!=3)
  104.                 {error_pic88x31("Site is","blocked",8,30,3);}
  105.                 else
  106.                 {error_pic88x15("Blocked site",2,1);}
  107.         }
  108. }
  109.  
  110. if(isset($_GET['type'])) {
  111.         if($_GET['type']==1) {
  112.  
  113. header ("Content-type: image/gif");
  114. $im = @ImageCreate(88, 31);
  115.  
  116. if (isset($a[1]) && isset($a[2]) && isset($a[3])) $bg1=Array($a[1],$a[2],$a[3]); else $bg1=Array(255, 255, 255);
  117.         $bg2=$bg1;
  118.  
  119. if (isset($a[4]) && isset($a[5]) && isset($a[6])) $g=ImageColorAllocate($im,$a[4],$a[5],$a[6]); else $g=ImageColorAllocate($im,0,109,0);
  120.  
  121. if (isset($a[7]) && isset($a[8]) && isset($a[9])) $y=ImageColorAllocate($im,$a[7],$a[8],$a[9]); else $y=ImageColorAllocate($im,240,0,0);
  122.  
  123. if (isset($a[10])&& isset($a[11])&& isset($a[12]))$b=ImageColorAllocate($im,$a[10],$a[11],$a[12]); else $b=ImageColorAllocate($im,50,50,50);
  124.  
  125. if (isset($a[13])&& isset($a[14])&& isset($a[15])) $bg2=Array($a[13],$a[14],$a[15]);
  126.  
  127. imagefill($im, 0, 0, ImageColorAllocate($im, $bg1[0], $bg1[1], $bg1[2]));
  128.  
  129. if ($bg1!=$bg2)
  130. for ($gy=0;$gy<=30;$gy++)
  131.         ImageLine($im, 0, $gy, 87, $gy, ImageColorAllocate($im,
  132.         $bg1[0]+ceil(($bg2[0]-$bg1[0])/30*$gy),
  133.         $bg1[1]+ceil(($bg2[1]-$bg1[1])/30*$gy),
  134.         $bg1[2]+ceil(($bg2[2]-$bg1[2])/30*$gy)) );
  135.  
  136. imagerectangle($im, 0, 0, 87, 30, $b);
  137.  
  138. $size=9;
  139. $prs="Google: ".$pr."/10";
  140. $cys="Yandex: ".$cy;
  141. $font=2;
  142.  
  143. imagestring ($im, $font, 5,  2,  $prs, $g);
  144. imagestring ($im, $font, 5, 15,  $cys, $y);
  145.  
  146. imagegif($im);
  147.  
  148. } elseif($_GET['type']==2) {
  149.  
  150. header ("Content-type: image/gif");
  151. $im=@imagecreatefromgif("buttons/2.gif") or die(error_pic88x31("Change code","",7,17,4));
  152.  
  153. $g=imagecolorallocate($im,80,80,80);
  154.  
  155. $y=imagecolorallocate($im,80,80,80);
  156.  
  157. $prs="PR: ".$pr."/10";
  158. $cys="CY: ".$cy;
  159. $font=2;
  160.  
  161. imagestring ($im, $font, 5, 2,  $cys, $y);
  162. imagestring ($im, $font, 5,  15,  $prs, $g);
  163.  
  164. imagegif($im);
  165.  
  166. } elseif($_GET['type']==3) {
  167.  
  168. $numpic = (int)$_GET['img'];
  169. if($numpic=="") $numpic = 1;
  170.  
  171. header("Content-Type:image/gif");
  172. $image = @imagecreatefromgif('buttons/b'.$numpic.'.gif') or die(error_pic88x31("Change code","",7,17,4));
  173.  
  174. define('FONT_NAME', 'fonts/arial.ttf');
  175. define('FONT_SIZE', 8);
  176.  
  177. $color1 = imagecolorallocate ($image, 255, 255, 255);
  178. $color2 = imagecolorallocate ($image, 40, 40, 40);
  179.  
  180. $textCY = win2uni('тИЦ: '.$cy);
  181. $textPR = win2uni('PR: '.$pr.' / 10');
  182.  
  183. $coord = imagettfbbox(
  184.  FONT_SIZE,  
  185.  0,        
  186.  FONT_NAME,
  187.  $textPR  
  188.  );
  189.  
  190. $width = $coord[2] - $coord[0];
  191. $height = $coord[1] - $coord[7];
  192.  
  193.  
  194.    $image,      
  195.    FONT_SIZE,  
  196.    0,          
  197.    5, 12,    
  198.    $color2,  
  199.    FONT_NAME,  
  200.    $textCY);
  201.  
  202.    $image,      
  203.    FONT_SIZE,  
  204.    0,          
  205.    5, 25,    
  206.    $color1,  
  207.    FONT_NAME,  
  208.    $textPR);
  209.  
  210. header('Content-type: image/gif');
  211. imagegif($image);
  212. imagedestroy($image);
  213.  
  214. } elseif($_GET['type']==4) {
  215.  
  216.  
  217. header("Content-Type:image/gif");
  218. $image = @imagecreatefromgif('buttons/bl1.gif') or die(error_pic88x31("Change code","",7,17,4));
  219.  
  220. define('FONT_NAME', 'fonts/arial.ttf');
  221. define('FONT_SIZE', 8);
  222.  
  223. $color1 = imagecolorallocate ($image, 255, 255, 255);
  224. $color2 = imagecolorallocate ($image, 40, 40, 40);
  225.  
  226. $textCY = win2uni('тИЦ: '.$cy);
  227. $textPR = win2uni('PR: '.$pr.' / 10');
  228.  
  229. $coord = imagettfbbox(
  230.  FONT_SIZE,  
  231.  0,        
  232.  FONT_NAME,
  233.  $textPR  
  234.  );
  235.  
  236. $width = $coord[2] - $coord[0];
  237. $height = $coord[1] - $coord[7];
  238.  
  239.  
  240.    $image,      
  241.    FONT_SIZE,  
  242.    0,          
  243.    5, 13,    
  244.    $color1,  
  245.    FONT_NAME,  
  246.    $textCY);
  247.  
  248.    $image,      
  249.    FONT_SIZE,  
  250.    0,          
  251.    5, 26,    
  252.    $color1,  
  253.    FONT_NAME,  
  254.    $textPR);
  255.  
  256. header('Content-type: image/gif');
  257. imagegif($image);
  258. imagedestroy($image);
  259.  
  260. } elseif($_GET['type']==6) {
  261.  
  262.  
  263. header("Content-Type:image/gif");
  264. $image = @imagecreatefromgif('buttons/6.gif') or die(error_pic88x31("Change code","",7,17,4));
  265.  
  266. define('FONT_NAME', 'fonts/trebuc.ttf');
  267. define('FONT_SIZE', 8);
  268.  
  269. $color1 = imagecolorallocate ($image, 100, 100, 100);
  270. $color2 = imagecolorallocate ($image, 40, 40, 40);
  271.  
  272. $textCY = win2uni('CY: '.$cy);
  273. $textPR = win2uni('PR: '.$pr.'');
  274.  
  275. $coord = imagettfbbox(
  276.  FONT_SIZE,  
  277.  0,        
  278.  FONT_NAME,
  279.  $textPR  
  280.  );
  281.  
  282. $width = $coord[2] - $coord[0];
  283. $height = $coord[1] - $coord[7];
  284.  
  285.  
  286.    $image,      
  287.    FONT_SIZE,  
  288.    0,          
  289.    5, 13,    
  290.    $color1,  
  291.    FONT_NAME,  
  292.    $textCY);
  293.  
  294.    $image,      
  295.    FONT_SIZE,  
  296.    0,          
  297.    5, 26,    
  298.    $color1,  
  299.    FONT_NAME,  
  300.    $textPR);
  301.  
  302. header('Content-type: image/gif');
  303. imagegif($image);
  304. imagedestroy($image);
  305.  
  306. } elseif($_GET['type']==22) {
  307.  
  308.  
  309. header("Content-Type:image/gif");
  310. $image = @imagecreatefromgif('buttons/22.gif') or die(error_pic88x31("Change code","",7,17,4));
  311.  
  312. define('FONT_NAME', 'fonts/trebuc.ttf');
  313. define('FONT_SIZE', 8);
  314.  
  315. $color1 = imagecolorallocate ($image, 100, 100, 100);
  316. $color2 = imagecolorallocate ($image, 40, 40, 40);
  317.  
  318. $textCY = win2uni('CY: '.$cy);
  319. $textPR = win2uni('PR: '.$pr.'');
  320.  
  321. $coord = imagettfbbox(
  322.  FONT_SIZE,
  323.  0,
  324.  FONT_NAME,
  325.  $textPR
  326.  );
  327.  
  328. $width = $coord[2] - $coord[0];
  329. $height = $coord[1] - $coord[7];
  330.  
  331.  
  332.    $image,
  333.    FONT_SIZE,
  334.    0,
  335.    25, 13,
  336.    $color1,
  337.    FONT_NAME,
  338.    $textCY);
  339.  
  340.    $image,
  341.    FONT_SIZE,
  342.    0,
  343.    25, 26,
  344.    $color1,
  345.    FONT_NAME,
  346.    $textPR);
  347.  
  348. header('Content-type: image/gif');
  349. imagegif($image);
  350. imagedestroy($image);
  351.  
  352. } elseif($_GET['type']==9) {
  353.  
  354.  
  355. header("Content-Type:image/gif");
  356. $image = @imagecreatefromgif('buttons/9.gif') or die(error_pic88x31("Change code","",7,17,4));
  357.  
  358. define('FONT_NAME', 'fonts/trebuc.ttf');
  359. define('FONT_SIZE', 8);
  360.  
  361. $color1 = imagecolorallocate ($image, 255, 255, 255);
  362. $color2 = imagecolorallocate ($image, 255, 255, 255);
  363.  
  364. $textCY = win2uni('CY: '.$cy);
  365. $textPR = win2uni('PR: '.$pr.'');
  366.  
  367. $coord = imagettfbbox(
  368.  FONT_SIZE,
  369.  0,
  370.  FONT_NAME,
  371.  $textPR
  372.  );
  373.  
  374. $width = $coord[2] - $coord[0];
  375. $height = $coord[1] - $coord[7];
  376.  
  377.  
  378.    $image,
  379.    FONT_SIZE,
  380.    0,
  381.    5, 13,
  382.    $color1,
  383.    FONT_NAME,
  384.    $textCY);
  385.  
  386.    $image,
  387.    FONT_SIZE,
  388.    0,
  389.    5, 26,
  390.    $color1,
  391.    FONT_NAME,
  392.    $textPR);
  393.  
  394. header('Content-type: image/gif');
  395. imagegif($image);
  396. imagedestroy($image);
  397.  
  398.  
  399. } elseif($_GET['type']==7) {
  400.  
  401.  
  402. header("Content-Type:image/gif");
  403. $image = @imagecreatefromgif('buttons/7.gif') or die(error_pic88x31("Change code","",7,17,4));
  404.  
  405. define('FONT_NAME', 'fonts/vrinda.ttf');
  406. define('FONT_SIZE', 13);
  407.  
  408. $color1 = imagecolorallocate ($image, 103, 0,0);
  409. $color2 = imagecolorallocate ($image, 40, 40, 40);
  410.  
  411. $textCY = win2uni('CY: '.$cy);
  412. $textPR = win2uni('PR: '.$pr.'');
  413.  
  414. $coord = imagettfbbox(
  415.  FONT_SIZE,  
  416.  0,        
  417.  FONT_NAME,
  418.  $textPR  
  419.  );
  420.  
  421. $width = $coord[2] - $coord[0];
  422. $height = $coord[1] - $coord[7];
  423.  
  424.  
  425.    $image,      
  426.    FONT_SIZE,  
  427.    0,          
  428.    5, 13,    
  429.    $color1,  
  430.    FONT_NAME,  
  431.    $textCY);
  432.  
  433.    $image,      
  434.    FONT_SIZE,  
  435.    0,          
  436.    5, 26,    
  437.    $color1,  
  438.    FONT_NAME,  
  439.    $textPR);
  440.  
  441. header('Content-type: image/gif');
  442. imagegif($image);
  443. imagedestroy($image);
  444.  
  445.  
  446. } elseif($_GET['type']==8) {
  447.  
  448.  
  449. header("Content-Type:image/gif");
  450. $image = @imagecreatefromgif('buttons/8.gif') or die(error_pic88x31("Change code","",7,17,4));
  451.  
  452. define('FONT_NAME', 'fonts/arial.ttf');
  453. define('FONT_SIZE', 9);
  454.  
  455. $color1 = imagecolorallocate ($image, 102, 102, 102);
  456. $color2 = imagecolorallocate ($image, 40, 40, 40);
  457.  
  458. $textCY = win2uni('CY: '.$cy);
  459. $textPR = win2uni('PR: '.$pr.' / 10');
  460.  
  461. $coord = imagettfbbox(
  462.  FONT_SIZE,  
  463.  0,        
  464.  FONT_NAME,
  465.  $textPR  
  466.  );
  467.  
  468. $width = $coord[2] - $coord[0];
  469. $height = $coord[1] - $coord[7];
  470.  
  471.  
  472.    $image,      
  473.    FONT_SIZE,  
  474.    0,          
  475.    5, 13,    
  476.    $color1,  
  477.    FONT_NAME,  
  478.    $textCY);
  479.  
  480.    $image,      
  481.    FONT_SIZE,  
  482.    0,          
  483.    5, 26,    
  484.    $color1,  
  485.    FONT_NAME,  
  486.    $textPR);
  487.  
  488. header('Content-type: image/gif');
  489. imagegif($image);
  490. imagedestroy($image);
  491.  
  492.  
  493. } elseif($_GET['type']==11) {
  494.  
  495.  
  496. header("Content-Type:image/gif");
  497. $image = @imagecreatefromgif('buttons/11.gif') or die(error_pic88x31("Change code","",3,29,4));
  498.  
  499. define('FONT_NAME', 'fonts/trebuc.ttf');
  500. define('FONT_NAME2', 'fonts/trebucb0.ttf');
  501. define('FONT_NAME3', 'fonts/visitor2.ttf');
  502. define('FONT_SIZE',9);
  503. define('FONT_SIZE2',9);
  504.  
  505. $color1 = imagecolorallocate ($image, 255, 255, 255);
  506. $color2 = imagecolorallocate ($image, 40, 40, 40);
  507.  
  508. $textCY = win2uni('cy');
  509. $textPR = win2uni('pr');
  510. $numCY = win2uni($cy);
  511. $numPR = win2uni($pr);
  512.  
  513. $coord = imagettfbbox(
  514.  FONT_SIZE,  
  515.  0,        
  516.  FONT_NAME3,
  517.  $textPR.$numPR  
  518.  );
  519.  
  520. $width = $coord[2] - $coord[0];
  521. $height = $coord[1] - $coord[7];
  522.  
  523.    $image,      
  524.    FONT_SIZE2,  
  525.    0,          
  526.    37, 10,    
  527.    $color1,  
  528.    FONT_NAME3,  
  529.    $textCY);
  530.  
  531.  
  532.    $image,      
  533.    FONT_SIZE,  
  534.    0,          
  535.    5, 10,    
  536.    $color1,  
  537.    FONT_NAME3,  
  538.    $textPR);
  539.        
  540.        
  541.    $image,      
  542.    FONT_SIZE2,  
  543.    0,          
  544.    52, 10,    
  545.    $color1,  
  546.    FONT_NAME3,  
  547.    substr($numCY,0,6));
  548.  
  549.  
  550.    $image,      
  551.    FONT_SIZE,  
  552.    0,          
  553.    22, 10,    
  554.    $color1,  
  555.    FONT_NAME3,  
  556.    $numPR);
  557.  
  558. header('Content-type: image/gif');
  559. imagegif($image);
  560. imagedestroy($image);
  561.  
  562. } elseif($_GET['type']==16) {
  563.  
  564.  
  565. header("Content-Type:image/gif");
  566. $image = @imagecreatefromgif('buttons/16.gif') or die(error_pic88x31("Change code","",3,29,4));
  567.  
  568. define('FONT_NAME', 'fonts/trebuc.ttf');
  569. define('FONT_NAME2', 'fonts/trebucb0.ttf');
  570. define('FONT_NAME3', 'fonts/visitor2.ttf');
  571. define('FONT_SIZE',9);
  572. define('FONT_SIZE2',9);
  573.  
  574. $color1 = imagecolorallocate ($image, 255, 255, 255);
  575. $color2 = imagecolorallocate ($image, 40, 40, 40);
  576.  
  577. $textCY = win2uni('cy');
  578. $textPR = win2uni('pr');
  579. $numCY = win2uni($cy);
  580. $numPR = win2uni($pr);
  581.  
  582. $coord = imagettfbbox(
  583.  FONT_SIZE,  
  584.  0,        
  585.  FONT_NAME3,
  586.  $textPR.$numPR  
  587.  );
  588.  
  589. $width = $coord[2] - $coord[0];
  590. $height = $coord[1] - $coord[7];
  591.  
  592.    $image,      
  593.    FONT_SIZE2,  
  594.    0,          
  595.    37, 10,    
  596.    $color1,  
  597.    FONT_NAME3,  
  598.    $textCY);
  599.  
  600.  
  601.    $image,      
  602.    FONT_SIZE,  
  603.    0,          
  604.    5, 10,    
  605.    $color1,  
  606.    FONT_NAME3,  
  607.    $textPR);
  608.        
  609.        
  610.    $image,      
  611.    FONT_SIZE2,  
  612.    0,          
  613.    52, 10,    
  614.    $color1,  
  615.    FONT_NAME3,  
  616.    substr($numCY,0,6));
  617.  
  618.  
  619.    $image,      
  620.    FONT_SIZE,  
  621.    0,          
  622.    22, 10,    
  623.    $color1,  
  624.    FONT_NAME3,  
  625.    $numPR);
  626.  
  627. header('Content-type: image/gif');
  628. imagegif($image);
  629. imagedestroy($image);
  630.  
  631. } else {
  632. error_pic88x31("Change code","",7,17,4);}
  633. } else {
  634. error_pic88x31("Change code","",7,17,4);
  635. }
  636. ?>
  637.  
tgcoin Отправлено: 03 Января, 2012 - 16:13:24 • Тема: помогите сделать поддержку языков • Форум: Напишите за меня, пожалуйста

Ответов: 2
Просмотров: 112
узнать как это сделать и код
tgcoin Отправлено: 03 Января, 2012 - 16:02:41 • Тема: помогите сделать поддержку языков • Форум: Напишите за меня, пожалуйста

Ответов: 2
Просмотров: 112
вот есть сайт http://depositfiles[dot]com/ru/ видете как там можно переключать языки
нужно сделать также для моего сайта
tgcoin Отправлено: 03 Января, 2012 - 14:15:57 • Тема: вопрос про eregi() • Форум: Вопросы новичков

Ответов: 2
Просмотров: 146
правдо ли мне сказали? -

В php 5 ввели новый уровень ошибок Deprecated. Тоесть те функции, которых в новых версиях php не будет, у них статус Deprecated. Вобщем не надо их использовать, потому, что когда хостер поставит новую версию php, то ваш сайт просто перестанет работать

Потому, что в новых версиях php функции eregi() не будет. У неё сейчас статус Deprecated
замените везде функцию eregi() на preg_match()
tgcoin Отправлено: 03 Января, 2012 - 12:54:50 • Тема: помогите сделать ошибку • Форум: Напишите за меня, пожалуйста

Ответов: 16
Просмотров: 458
написал лс
tgcoin Отправлено: 03 Января, 2012 - 12:46:19 • Тема: помогите сделать ошибку • Форум: Напишите за меня, пожалуйста

Ответов: 16
Просмотров: 458
добавте
tgcoin Отправлено: 03 Января, 2012 - 12:40:58 • Тема: помогите сделать ошибку • Форум: Напишите за меня, пожалуйста

Ответов: 16
Просмотров: 458
у вас есть аська или скайп желательно скайп!
tgcoin Отправлено: 03 Января, 2012 - 12:26:07 • Тема: помогите сделать ошибку • Форум: Напишите за меня, пожалуйста

Ответов: 16
Просмотров: 458
тоже ни как не пишет
tgcoin Отправлено: 03 Января, 2012 - 11:13:51 • Тема: помогите сделать ошибку • Форум: Напишите за меня, пожалуйста

Ответов: 16
Просмотров: 458
то же самое
tgcoin Отправлено: 03 Января, 2012 - 10:59:27 • Тема: помогите сделать ошибку • Форум: Напишите за меня, пожалуйста

Ответов: 16
Просмотров: 458
когда на маём сайте там там есть такое окошко когда человек ничего не вводит
вот сайт http://e-root[dot]ru/index.php

Страниц (6): « 1 2 3 4 [5] 6 »
Powered by PHP  Powered By MySQL  Powered by Nginx  Valid CSS  RSS

 
Powered by ExBB FM 1.0 RC1. InvisionExBB