Jump to content

genu

Members
  • Posts

    32
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

genu's Achievements

Member

Member (2/5)

0

Reputation

  1. if the content is to be downloaded, however, do I need to convert the entities?
  2. Hey, I'm working on an application that allows users to submit content, but i'm having a hard time understanding how exactly the submitted information is encoded. The content is in another language I know that I have to utilize utf-8 in order to render the special characters correctly. How do I make sure that the characters inputed by the users are utf-8 compliant though? I've noticed that in windows vista, I have two options for the language which I've selected: "legacy" and "standard", and they (although output the same character), the Hex values for them are not ideantical. How is this typically done, so that all user submitted content are subject to the same encoding. Do I need to, perhaps, have buttons to insert special character's html entities via javascript? When storing the submitted data (assuming it was typed with utf-8 characters), do store them in the mysql db as is? or do store their html entity equivalent?
  3. ok... I will try that, although is that the fastest way? would it cause a significant slowdown if, for example, I would have to do that loop for every item in a list -- when rendering a page?
  4. Lets say I have this array and string: $keywords = array('[keyword1]', '[keyword2]', '[keyword3]'); $string = '<h1><strong>[keyword1]</strong></h1><br /> not keyword [keyword2], or keyword <strong>[keyword3]</strong>'; What is the best method that I could strip everything from the $string but the $keywords. so that the end result would just a list of the keywords in $string: keyword1 keyword2 keyword3
  5. Hey, now that I got this function to work. Is it possible to get the same effect from another function that has allow_url_fopen dissabled on the server?
  6. After I posted this, I continue to serach google and PHP.net, and After I added readfile($filename); it seems to have worked. I appreciate the replies...thank you
  7. Hi, i've been working on a function to fetch and "mp3" from a server, and display the "Download" dialog in order to download it. it looks like this: header("HTTP/1.1 200 OK"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Expires: 0"); header("Content-Length: ".$filesize); header("Content-Type: application/force-download"); header("Content-Disposition: attachment; filename=".$filename); header("Content-Transfer-Encoding: binary"); Basically, I'm trying to avoid the mp3 to open with the default player. That function works that it opens the download dialog. The problem is that the file is 0bytes after download. Am I missing something?
  8. Is there a compatible solution (php4 & 5) that would enable me to generate download links to mp3, avi, wmv, etc. That would display a download dialog on click rather than open with the associated program?
  9. Thanks lemmin, that worked...
  10. I tried this: <?php $array = 'test'; $test = array('test1','test2','test3'); echo $$array[0]; ?> but it doesn't return anything
  11. but I don't really know what month that $task is going to be. It could be February, March, April, etc... I have predefined arrays for each one...not just January.
  12. How can I access an array through a variable? for example: I have: $_GET['task'] = "january" and I have a predefined array like so: how can I access the $janurary array based on the the value of $task? I tried: echo $task[0]; but returned just "j" instead of 'test1' is there another way to reference that $january array?
  13. genu

    MP3 link

    is there a way to make an <a href="mp3 url">Download</a> that opens up the download dialog rather than the default player which plays it automatically?
×
×
  • 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.