Calificación:
  • 0 voto(s) - 0 Media
  • 1
  • 2
  • 3
  • 4
  • 5
Signos Raros
#1
Hola, Estoy Creando una Web y me aparecen signos raros cuando pongo letras como la Ñ O Z Les Dejo una demo:

http://www.me-gusta.com.nu/like.php?id=69

Y Dos archivos Que son para editar todo la web que son los unicos editables:

INDEX.PHP

Código:
<?
include ("config.php");
if ($_POST["like"]) {
    $like=filtro($_POST["like"]);
    mysql_query("INSERT INTO fblike VALUES(NULL, '$like', '1')");
    $x=mysql_query("SELECT * FROM fblike ORDER BY id DESC LIMIT 1");
    while ($y=mysql_fetch_assoc($x)){
$id=$y['id'];
}
    ?>
    <script type="text/javascript"> window.location.href="<?=$url_site?>like.php?id=<?=$id?>";</script>
    <?
}
?>

<?
function filtro($cadena){
    $carac = array("<",">","'",'"');
    $sust = array("&lt;","&gt;","\'",'\"');
    return str_replace($carac,$sust,$cadena);
}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
    <head>
        <title>Www.Me-Gusta.Com.Nu - Las mejores Frases - Agrega la tuya y busca la que mas te guste!</title>

        <link rel="stylesheet" href="styles.css">
        
        <script type="text/javascript" src="js/jquery.js"></script>
        <script type="text/javascript" src="js/jquery.corner.js"></script>
        <script type="text/javascript" src="js/main.js"></script>

            
        </script><link type="image/x-icon" href="images/facebook.gif" rel="icon" />
        <script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-17325205-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
    </head>
    
    <body>
        <div id="fb-root"></div>
        <script>
          window.fbAsyncInit = function() {
            FB.init({appId: '48272f6b9a278d88b2ec480da8790513', status: true, cookie: true,
                     xfbml: true});
          };
          (function() {
            var e = document.createElement('script'); e.async = true;
            e.src = document.location.protocol +
              '//connect.facebook.net/en_US/all.js';
            document.getElementById('fb-root').appendChild(e);
          }());
        </script>
        
    
<div id="header"> <a href="index.php" id="branding"><span>LikeItNow</span></a>
  <p id="total_pages" class="rounded"><span id="count">
    <?
        $x=mysql_query("SELECT * FROM fblike ORDER BY id DESC LIMIT 0,1");
        $nr=0;
        while ($y=mysql_fetch_assoc($x)) {
            $id=$y['id'];
            $like=$y['like'];
            ?>
    <?=$id?>
    <? echo substr(0,44);?>
    <?
    }
    ?>
    </span> <strong><em>Frases Creadas <img src="images/smyle.png"/><br> <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2FWww.Me-Re-Gusta.Com.Ar%2F&amp;layout=button_count&amp;show_faces=true&amp;width=120&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:120px; height:20px"></iframe></em><br></strong></p>
        </div>
        
        <div id="page_details" class="rounded">
            <h2>Crear Nueva Frase ▼ </h2>
            
  <p id="character_count"><a href="http://www.smallpirate.skn1.com" target="_blank">Small Pirate</a> | <a href="http://www.smallpirate.skn1.com" target="_blank">Peliculas Online en HD | </a>
  <form method="POST" action="index.php">
                <input type="text" name="like" class="comments" maxlength="100" value="Escribi lo que pensas aca...!" onkeyup="htmlspecialchars(this.value, ENT_QUOTES);
" onfocus="if(this.value=='Escribi lo que pensas aca...!')this.value=''" />
                <p id="url"></p>

            Pega tus simbolos: ♡ | ♥ | ★ | ♀ | ♂ | ♠ | ♤ | ♣ | ♧ | © | ± | ☺ | ☻ | ☼ | ☎ | ♨ | ☞ | ♩ | ♪ | ♫
    <button id="create_button" type="submit"></button>
            </form>
        <br> </div>
        
<div id="page_details" class="rounded">
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-6657899295798788";
/* 728x90, creado 10/09/10 */
google_ad_slot = "0820173058";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
</div>


        <div id="popular_pages" class="rounded box_420">
            <h2>Frases más populares</h2>
            <ul>
                                    <?
    $x=mysql_query("SELECT * FROM fblike ORDER BY hits DESC LIMIT 0,50");
    $nr=0;
    while ($y=mysql_fetch_assoc($x)) {
        $id=$y['id'];
        $like=$y['like'];
        ?>
<font size=1>
              <li><a href='like.php?id=<?=$id?>'><iframe src="http://www.facebook.com/widgets/like.php?href=<?=$url_site?>like.php?id=<?=$id?>&amp;layout=button_count&amp;show_faces=false&amp;width=120&amp;action=like&amp;font&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:120px; height:21px;" allowTransparency="true"></iframe><? echo substr($like, 0,45);?>...</a><br></li></font>
         <?
    }
    ?>
                            </ul>
        </div>
        
        <div id="new_pages" class="rounded box_420">
            <h2>Ultimas Frases</h2>
            <ul>
                                     <?
        $x=mysql_query("SELECT * FROM fblike ORDER BY id DESC LIMIT 0,50");
        $nr=0;
        while ($y=mysql_fetch_assoc($x)) {
            $id=$y['id'];
            $like=$y['like'];
            ?>
<font size=1>          
           <li><a href='like.php?id=<?=$id?>'><iframe src="http://www.facebook.com/widgets/like.php?href=<?=$url_site?>like.php?id=<?=$id?>&amp;layout=button_count&amp;show_faces=false&amp;width=120&amp;action=like&amp;font&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:120px; height:21px;" allowTransparency="true"></iframe><? echo substr($like, 0,45);?>...</a><br></li></font>
             <?
        }
        ?>

                                
            </ul>
        </div>
        
            
<strong><center><p id="footer" class="rounded">Www.Me-Gusta.com.nu &copy; 2011. - By Small Pirate || <!-- Histats.com  START  (standard)-->
<script>var _wau = _wau || []; _wau.push(["tab", "89ov8yo8wgm0", "1mo", "left-middle"]);(function() { var s=document.createElement("script"); s.async=true; s.src="http://widgets.amung.us/tab.js";document.getElementsByTagName("head")[0].appendChild(s);})();</script>

                   </p></center>

    </body>
</html>

LIKE.PHP

Código:
<? include ("config.php");
mysql_query("SET NAMES 'utf8'");
$id=$_GET["id"];
$x=mysql_query("SELECT * FROM fblike WHERE id=$id");
    while ($y=mysql_fetch_assoc($x)){
    $like=$y['like'];
    $new_hits=$y['hits']+1;
    $hits=$y['hits'];
    }
mysql_query("UPDATE fblike SET hits='$new_hits' WHERE id='$id'");
?>
<!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=utf-8" />
<meta property="og:title" content="<?=$like?>"/>
<title><?=$like?></title>
<link rel="stylesheet" href="styles.css" type="text/css">
<style type="text/css">
<!--
a:link {
    color: 3d5888;
    text-decoration: none;
}
a:visited {
    text-decoration: none;
    color: 3d5888;
}
a:hover {
    text-decoration: none;
    color: 3d5888;
}
a:active {
    text-decoration: none;
    color: 3d5888;
}
-->
</style></script><link type="image/x-icon" href="images/facebook.gif" rel="icon" />
</script><meta property="og:site_name" content="Www.Me-Gusta.Com.Nu"/></head>
    <body>
        <div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({appId: 'your app id', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
</script><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
        
        
<div id="header"> <a href="index.php" id="branding"><span>LikeItNow</span></a>
  <p id="total_pages" class="rounded"><span id="count"></span><img src="images/creados.gif"/><a href="index.php">
    <font color="#FF0000"><strong>Crea tu Frase</font></a><br></p></strong>
        </div>
        
        
<div align="center" class="rounded" id="page_details">
  <h1 align="center">
    <?=$like?>
  </h1>
  <br />
  <iframe src="http://www.facebook.com/widgets/like.php?href=<?=$url_site?>like.php?id=<?=$id?>&amp;layout=standard&amp;show_faces=true&amp;width=400&amp;action=like&amp;font&amp;colorscheme=light&amp;height=20" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:24px;" allowTransparency="true"></iframe>
  <p align="center">
  <ul id="share">
    <li>
      
    </li>
  </ul>
  <?
            $x=mysql_query("SELECT * FROM fblike ORDER BY RAND() LIMIT 1");
            while ($y=mysql_fetch_assoc($x)) {
                $like=$y['like'];
                $id2=$y['id'];
            ?>
  <br />
  <br />
<script type="text/javascript"><!--
google_ad_client = "pub-6657899295798788";
/* 728x15, creado 12/06/09 */
google_ad_slot = "9686010170";
google_ad_width = 728;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br /><br />
</h2>
  <script type="text/javascript"><!--
google_ad_client = "pub-6657899295798788";
/* 728x15, creado 12/06/09 */
google_ad_slot = "9686010170";
google_ad_width = 728;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
  <?
            }
            ?>
</div>
        
        <div id="comments" class="rounded box_420">
            <h2>Lo mejor!</h2>
            <fb:comments width="420"><center>
<script type="text/javascript"><!--
google_ad_client = "pub-6657899295798788";
/* 336x280, creado 10/09/10 */
google_ad_slot = "3910091474";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<script type="text/javascript"><!--
google_ad_client = "pub-6657899295798788";
/* 336x280, creado 10/09/10 */
google_ad_slot = "3910091474";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center></fb:comments>
        </div>
        
        <div id="useful_links" class="rounded box_420">
            <h2>Frases del momento</h2>
            <ul>
    <?
        $x=mysql_query("SELECT * FROM fblike ORDER BY id DESC LIMIT 0,18");
        $nr=0;
        while ($y=mysql_fetch_assoc($x)) {
            $id=$y['id'];
            $like=$y['like'];
            ?>
<font size=1>          
           <li><a href='like.php?id=<?=$id?>'><iframe src="http://www.facebook.com/widgets/like.php?href=<?=$url_site?>like.php?id=<?=$id?>&amp;layout=button_count&amp;show_faces=false&amp;width=110&amp;action=like&amp;font&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:110px; height:21px;" allowTransparency="true"></iframe><? echo substr($like, 0,45);?>... Leer</a><br></li></font>
             <?
        }
        ?>
</ul>        </div>
        
<strong><center><p id="footer" class="rounded">Www.Me-Gusta.Com.Nu &copy; 2011. - By Small Pirate ||
    
    </body>
</html>

Me parece que ay que editar el LINK.PHP
Si me lo pueden poner editado se los agradeceria.

y depaso una pregunta si yo quiero otra web y otro hosting
como ago para reservar otro hosting en mi misma cuenta? :S
Small Pirate! Peliculas Online en Calidad De Dvd y HD

[Imagen: 1317323629.png]
WWW
#2
asegurate que las tablas detu bd sean efectivamente utf8
WWW
#3
Muevo el Tema a Scripts/CMS ya que no guarda relacion con el hosting Guiño .
Cualquier duda, pregunta, comentario... Aquí estoy Guiño
#4
como dijeron ahi arriva debes revisar que los archivos esten guardadods en utf-8 sin bom Guiño
WWW




Usuarios navegando en este tema: 1 invitado(s)