Jump to content

gdfhghjdfghgfhf

Members
  • Posts

    218
  • Joined

  • Last visited

Everything posted by gdfhghjdfghgfhf

  1. well like i said when i check inside the database, the accents are already encoded with html entities and since the shoutbox display the accents correctly, there must be a way to do it... here is the script of the shoutbox i am using if this can help: http://qshout.borisding.com/download_qshout.php?action=download
  2. oops for some reasons i had removed the meta tags i put it back but i still have the same problem http://www.pirate-punk.net/chat_archive.php
  3. bump see here, the accents works: http://www.pirate-punk.net/shoutbox/ but here it doesn't work: http://www.pirate-punk.net/chat_archive.php and it is the same text...
  4. it is a problem recalling it i'm 100% sure my database is set to utf8 and it is saving correctly, when i check in phpmyadmin the accents are correct and like i said, i am calling the data from the database/table of my shoutbox.... i just want to display the messages sent in the shoutbox on a different page... The shoutbox is already displaying the text from the database with the correct accents.... So if it was a problem with saving the data there would be display errors on the shoutbox too
  5. i have an array with a lot of items.... i'm looking for a function to keep only the items repeated at least 3 times example array( "one item", "two items", "two items", "three items", "three items", "three items", "end" ); would become array( "three items", "three items", "three items" ); thanks !!
  6. I'm trying to add [DL] tags between specific links to websites like mediafire and megaupload currently i use this code: $patern ='#(<a\s[^>]*href\="([^"]*(mediafire|rapidshare|megaupload|4shared|divshare|badongo|sendspace|sharebee|sendfile|filesend|kewlshare|zshare|filestube)[^"]*)"[^>]*>).*?</a>#i'; $postmsg2 = preg_replace($patern, '[DL]$2[/DL]', $postmsg); but it will only replace links embbed with <a href="">...</a> i would want to also replace links that doesn't have the <a href> tags so basically i'm looking for a code that would transform to: thanks a lot !
  7. just tryed to change it to longblob, still the same errors anyway like i said it isnt a problem with the database structure since the shoutbox script using the same messages in the same table of the same database is displaying the accents without any problem in fact, the messages in the database are already filtered with htmlentities and looks like this: ouè man
  8. i'm not sure what you mean... how can i know if my html is displayed in utf8 ?
  9. there is no accents in my script, accents come from the result of the query to database... and i already saved the file to utf-8 with the editor you told me to use it isn't a problem with the table of the database since the shoutbox script can correctly display the content of the message WITH the accents.... i don't understand why it doesn't work with my own script
  10. I just tryed with PSPad and setting the parameters to UTF-8 Same problem.
  11. i use wordpad, i always used it and never had any problem. I also tryed to include my script directly in my vbulletin forum, so it should be automatically converted to utf-8...
  12. i installed a shoutbox on my website... now i am trying to make an "archive" page for the shoutbox my code is really simple: the problem is that all accents will be messed up (characters like é è â à ç etc...) in $row["message"] i tryed a lot of things : utf8_decode, utf8_encode, htmlentities, html_entity_decode, etc.... i even tryed to remove the accents with str_replace or preg_replace... usually i can solve my accents problem with one of those function or simply with the utf-8 mysql query but this time i can't find a way to solve my problem someone please help me !!!
  13. i'm looking for a function or a part of code that would add a character before each word in a text "this is a text" would become "+this +is +a +text" can anyone please help me ? thanks !
  14. i said i'm a newbie in the post title i started this script based on a part of code i found on internet... i'm doing the best i can ...but this doesn't solve my problem, i'm still getting a blank page while trying to make a request to a page that is supposed to give results, like this one: http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=crass&api_key=097a7ab0f5b56a894eb7a25e1c51b0da
  15. sorry for late reply... on my website i have a menu that display the last post of my forum. when a user move the mouse over a post, it display a "popup" with the first words of the post... but sometimes the post contains long words and the words will appear outside of the popup because they are too long so i need to shorten the words like in the example i gave
  16. thanks for your reply ! hmmm i tryed to put this with the rest of my script but when i try with an artist that exist it gives me a blank page <?php ob_start(); $artist = "contravene"; $url = 'http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&' . 'artist=' . $artist . '&api_key=097a7ab0f5b56a894eb7a25e1c51b0da'; $headers = get_headers($url); if (400 >= (int) substr($headers[0], 9, 3)) { // echo 'Artist: ', $artist, ' does not exist.'; exit(0); } else { ob_start(); $xml = simplexml_load_file($url); echo rawurldecode($url); $url = ob_get_clean(); foreach($xmlObj as $artist) { ob_start(); $artist->name; $name = ob_get_clean(); ob_start(); echo $artist->image[3]; $image = ob_get_clean(); ob_start(); echo $artist->bio->content; $bio = ob_get_clean(); } echo $bio; } ?> what am i doing wrong ?
  17. Hello, i wrote a really simple script that gets information of a band from last.fm using SimpleXml here is an example of a working script: the only problem is that when the $request is different and the band doesn't exist, it gives me an error i want the script to stop and not display anything if the band is not found exemple, this script <?php $request = "ThisBandDoesNotExist"; ob_start(); echo rawurldecode("http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=$request&api_key=097a7ab0f5b56a894eb7a25e1c51b0da"); $url = ob_get_clean(); if (!$xmlObj = simplexml_load_file($url)) { echo "Error reading XML file"; } else { foreach($xmlObj as $artist) { ob_start(); $artist->name; $name = ob_get_clean(); ob_start(); echo $artist->image[3]; $image = ob_get_clean(); ob_start(); echo $artist->bio->content; $bio = ob_get_clean(); } } echo $bio; ?> will give this error: Warning: simplexml_load_file(http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=ThisBandDoesNotExist&api_key=097a7ab0f5b56a894eb7a25e1c51b0da) [function.simplexml-load-file]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in /var/alternc/html/a/anarchoi/anarchopunk/xml1.php on line 9 Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=ThisBandDoesNotExist&api_key=097a7ab0f5b56a894eb7a25e1c51b0da" in /var/alternc/html/a/anarchoi/anarchopunk/xml1.php on line 9 Error reading XML file thanks for helping me !!
  18. bump! here's another example of a text that will be messed up once parsed with the function given in ChemicalBliss's post
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.