Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Regular Coder
    Join Date
    Jan 2004
    Posts
    245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    include is added characters

    Hi,

    Can anybody try this out for me?

    include ("http://www.hitzradio.com/update_songinfo.php")

    to see if it adds these characters : ´╗┐ in front of the song that is on the site.

    It does it for me, but apparently not for everybody

    Thank you

  • #2
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    here is a simple overview of HTML entities...
    http://www.w3schools.com/html/html_entitiesref.asp

    ╗ - »
    ┐ - & #239
    ´ - & #191;
    Last edited by fci; 10-06-2004 at 07:07 PM.

  • #3
    Regular Coder
    Join Date
    Jan 2004
    Posts
    245
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok...but how do i get rid of it, because it's not there on the page that i am taking it from

  • #4
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    PHP Code:
    htmlentities(include ('http://www.hitzradio.com/update_songinfo.php')); 
    Read more at http://uk2.php.net/manual/en/function.htmlentities.php

  • #5
    Regular Coder
    Join Date
    Jan 2004
    Posts
    245
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It still gives me those 3 characters.

    I'm trying a way so that the song goes into a MySQL database (with the UPDATE feature), then i pull it out of there....you think that'll work?

  • #6
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    Did you read the PHP manual page? Did you add ENT_QUOTES?

  • #7
    Regular Coder
    Join Date
    Apr 2004
    Location
    Birmingham, MI
    Posts
    131
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Looks like an encoding issue. Is the page you are including 'update_songinfo.php' UTF-8?

  • #8
    Regular Coder
    Join Date
    Jan 2004
    Posts
    245
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok, here's what i did, first i had the code like this

    PHP Code:
     print htmlentities(include('http://www.hitzradio.com/update_songinfo.php'ENT_QUOTES)); 
    and it gave me a parse error because of the ','

    so then i changed my code to this

    PHP Code:

    $include 
    = include ("http://www.hitzradio.com/update_songinfo.php");
                  print 
    htmlentities("http://www.hitzradio.com/update_songinfo.php"ENT_QUOTES
    and it still gives me the weird characters

  • #9
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    The second one would just display the URI.

    Try this:
    PHP Code:
    $src = include 'http://www.hitzradio.com/update_songinfo.php';
    echo 
    htmlentities($srcENT_QUOTES); 

  • #10
    Regular Coder
    Join Date
    Jan 2004
    Posts
    245
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it still gives me the 3 characters.....is there a code that'll say "erase the first 3 characters" ?

  • #11
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    PHP Code:
    substr_replace($src''03); 

  • #12
    Regular Coder
    Join Date
    Jan 2004
    Posts
    245
    Thanks
    0
    Thanked 0 Times in 0 Posts
    isn't this supposed to solve the problem?

    PHP Code:

    print (substr_replace(include 'http://www.hitzradio.com/update_songinfo.php'' '03)); 
    because it didn't remove anything

    i even tried this

    PHP Code:

    $src 
    = include 'http://www.hitzradio.com/update_songinfo.php';
    print (
    substr_replace($src' '03)); 

  • #13
    Regular Coder
    Join Date
    Apr 2004
    Location
    Birmingham, MI
    Posts
    131
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can you show us the page where these characters are occuring?

  • #14
    Regular Coder
    Join Date
    Jan 2004
    Posts
    245
    Thanks
    0
    Thanked 0 Times in 0 Posts
    www.mtlbaseline.com/eng

    look to the right of the calender....above the image writen "sponsor" on it

  • #15
    Regular Coder
    Join Date
    Apr 2004
    Location
    Birmingham, MI
    Posts
    131
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ahh ha! you are including a UTF-8 file into an ISO-8859-1 encoded page.

    Thus your problem. Quick fix, save the offending ISO-8859-1 file to UTF-8 and you are all set.


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •