M6K adlı üyeden alıntı:
mesajı görüntüle
Tablo sayısı nasıl gösterme?
14
●2.903
- 26-11-2010, 00:03:34Fatal error: Function name must be a string in /home/feyk/public_html/index.php on line 97
- 26-11-2010, 00:04:4797.satırı yazar mısın index.php dosyandakiZekai adlı üyeden alıntı: mesajı görüntüle
- 26-11-2010, 00:08:17</head>M6K adlı üyeden alıntı: mesajı görüntüle

İndex.php yi veriyorum hocam; (veritabanı bilgilerini değiştirdim)
<?php define('mysql_hostname', 'localhost'); define('mysql_username', 'xxx'); define('mysql_password', 'xxx'); define('mysql_database', 'xxx'); ob_start('relink'); $root = "http://$_SERVER[HTTP_HOST]" . ereg_replace('/$', '', dirname($_SERVER['PHP_SELF'])) . '/'; $action = $_GET['action'] ? $_GET['action'] : ($_POST['action'] ? $_POST['action'] : ''); $connection = @mysql_connect(mysql_hostname, mysql_username, mysql_password) && @mysql_select_db(mysql_database) || die('<code>' . mysql_error() . '</code>'); switch ($action) { case 'generate_url': $parsed = @parse_url($_POST['url']); if ($parsed && strlen($_POST['url']) && ereg('\.', $_POST['url'])) { if (eregi('^[a-z0-9-]+$', $_POST['tag'])) { $tag = $_POST['tag']; $sql = "SELECT * FROM `urls` WHERE `url_tag` = '$tag' OR `url_id` = '$tag'"; $q = mysql_query($sql); $n = mysql_fetch_assoc($q); if ($n) { $cancel = true; } } if (!$cancel) { $url = ($parsed['scheme'] ? '' : 'http://') . (get_magic_quotes_gpc() ? mysql_real_escape_string(stripslashes($_POST['url'])) : mysql_real_escape_string($_POST['url'])); $sql = "INSERT INTO `urls` (`url_location`, `url_tag`) VALUES ('$url', '$_POST[tag]')"; $q = mysql_query($sql); $id = mysql_insert_id(); if (!$tag) { $result = '<strong>Yeni Link</strong>: <a href="' . $root . $id . '/">' . $root . $id . '/</a> !'; } else { $result = '<strong>Yeni Link</strong>: <a href="' . $root . $tag . '/">' . $root . $tag . '/</a> !'; } } else { if (ereg('^[0-9]+$', $_POST['tag'])) { $result = 'That tag is reserved for the system!'; } else { $result = 'Tag unavailable!'; } } } else { $result = 'Link Yanlış.'; } if ((bool) $_POST['javascript']) { header('Content-Type: text/plain'); die($result); } break; case 'redirect': if (is_numeric($_GET['id']) || eregi('^[a-z0-9-]+$', $_GET['tag'])) { if (!$_GET['tag']) { $sql = "SELECT * FROM `urls` WHERE `url_id` = $_GET[id]"; } else { $sql = "SELECT * FROM `urls` WHERE `url_tag` = '$_GET[tag]'"; } $q = mysql_query($sql); $r = mysql_fetch_assoc($q); header("Location: $r[url_location]"); exit; } else { header("Location: $root"); exit; } break; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso=8859-9" /> <meta name="description" content="Link Ufaltma Servisi" /> <meta name="keywords" content="link,ufalt,kısalt,servis" /> <title>Feyk.TK ~ Feyk Link Oluşturma Servisi</title> <link href="/css/main.css" rel="stylesheet" /> <link href="/img/favicon.png" rel="shortcut icon" /> <script language="javascript" type="text/javascript"> root = '<?php echo ereg_replace('/$', '', $root); ?>'; </script> <script language="javascript" type="text/javascript" src="/js/main.js"></script> </head> <body> <div id="header"> <center><img src="img/link.png"></a></center> </div> <form method="post" action="/" id="form"> <input type="hidden" name="action" value="generate_url" /> <h3 class="normal"><label for="url">Link (gerekli)</label></h3> <input type="text" name="url" id="url" class="input" /> <h3 class="normal"><label for="tag">Kelime (gerekli)</label></h3> <input type="text" name="tag" id="tag" class="input" /> <input type="submit" value="Yeni Linki Al" id="submit" class="button" /> <div id="result"><?php echo $result ? $result : ''; ?></div> </form><br><br><br><br><br><br> <h3 class="normal">© 2010 Feyk.TK <br> Feyk.TK bir <a href="http://www.esece.org">Esece Bilişim</a> projesidir.</h3> </body> </html> <?php function relink ($buffer) { global $root; return preg_replace('#(href|src|action)="/#i', '\\1="' . $root, $buffer); } ?> - 26-11-2010, 00:15:13
<?php define('mysql_hostname', 'localhost'); define('mysql_username', 'xxx'); define('mysql_password', 'xxx'); define('mysql_database', 'xxx'); ob_start('relink'); $root = "http://$_SERVER[HTTP_HOST]" . ereg_replace('/$', '', dirname($_SERVER['PHP_SELF'])) . '/'; $action = $_GET['action'] ? $_GET['action'] : ($_POST['action'] ? $_POST['action'] : ''); $connection = @mysql_connect(mysql_hostname, mysql_username, mysql_password) && @mysql_select_db(mysql_database) || die('<code>' . mysql_error() . '</code>'); switch ($action) { case 'generate_url': $parsed = @parse_url($_POST['url']); if ($parsed && strlen($_POST['url']) && ereg('\.', $_POST['url'])) { if (eregi('^[a-z0-9-]+$', $_POST['tag'])) { $tag = $_POST['tag']; $sql = "SELECT * FROM `urls` WHERE `url_tag` = '$tag' OR `url_id` = '$tag'"; $q = mysql_query($sql); $n = mysql_fetch_assoc($q); if ($n) { $cancel = true; } } if (!$cancel) { $url = ($parsed['scheme'] ? '' : 'http://') . (get_magic_quotes_gpc() ? mysql_real_escape_string(stripslashes($_POST['url'])) : mysql_real_escape_string($_POST['url'])); $sql = "INSERT INTO `urls` (`url_location`, `url_tag`) VALUES ('$url', '$_POST[tag]')"; $q = mysql_query($sql); $id = mysql_insert_id(); if (!$tag) { $result = '<strong>Yeni Link</strong>: <a href="' . $root . $id . '/">' . $root . $id . '/</a> !'; } else { $result = '<strong>Yeni Link</strong>: <a href="' . $root . $tag . '/">' . $root . $tag . '/</a> !'; } } else { if (ereg('^[0-9]+$', $_POST['tag'])) { $result = 'That tag is reserved for the system!'; } else { $result = 'Tag unavailable!'; } } } else { $result = 'Link Yanlış.'; } if ((bool) $_POST['javascript']) { header('Content-Type: text/plain'); die($result); } break; case 'redirect': if (is_numeric($_GET['id']) || eregi('^[a-z0-9-]+$', $_GET['tag'])) { if (!$_GET['tag']) { $sql = "SELECT * FROM `urls` WHERE `url_id` = $_GET[id]"; } else { $sql = "SELECT * FROM `urls` WHERE `url_tag` = '$_GET[tag]'"; } $q = mysql_query($sql); $r = mysql_fetch_assoc($q); header("Location: $r[url_location]"); exit; } else { header("Location: $root"); exit; } break; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso=8859-9" /> <meta name="description" content="Link Ufaltma Servisi" /> <meta name="keywords" content="link,ufalt,kısalt,servis" /> <title>Feyk.TK ~ Feyk Link Oluşturma Servisi</title> <link href="/css/main.css" rel="stylesheet" /> <link href="/img/favicon.png" rel="shortcut icon" /> <script language="javascript" type="text/javascript"> root = '<?php echo ereg_replace('/$', '', $root); ?>'; </script> <script language="javascript" type="text/javascript" src="/js/main.js"></script> </head> <body> <div id="header"> <center><img src="img/link.png"></a></center> </div> <form method="post" action="/" id="form"> <input type="hidden" name="action" value="generate_url" /> <h3 class="normal"><label for="url">Link (gerekli)</label></h3> <input type="text" name="url" id="url" class="input" /> <h3 class="normal"><label for="tag">Kelime (gerekli)</label></h3> <input type="text" name="tag" id="tag" class="input" /> <input type="submit" value="Yeni Linki Al" id="submit" class="button" /> <div id="result"><?php echo $result ? $result : ''; ?></div> </form><br><br><br><br><br> <?php $sorgu = mysql_query("select * from urls"); $sayi = mysql_num_rows($sorgu); echo "Toplam"; echo " "; echo "$sayi"; echo " "; echo "Link Eklenmiştir"; ?> <br> <h3 class="normal">© 2010 Feyk.TK <br> Feyk.TK bir <a href="http://www.esece.org">Esece Bilişim</a> projesidir.</h3> </body> </html> <?php function relink ($buffer) { global $root; return preg_replace('#(href|src|action)="/#i', '\\1="' . $root, $buffer); } ?>Böyle dene birde, olmadıysa Profilimden MSN Adresimi ekle yardımcı olayım teamviewer'dan - 26-11-2010, 00:19:57
- 26-11-2010, 00:24:26Rica Ederim. İyi Çalışmalar.Zekai adlı üyeden alıntı: mesajı görüntüle
