Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by ProblemHelpPlease

  1. Ill try and run a few tests with the headers I require and see what different email clients make of them. You dont happen to know where I can find a list of all the different header types and values that can be used when sending mail.
  2. I understand how to format the basic headers so they are in an array, my problem is I dont know what the correct way to set the relevant mime and content type headers is for an email that is base64 encoded when using pear mail. I dont want to pass headers to the pear mail script that it cant understand but I cant find any informtion that tells me what headers are accepted or what the correct format or order should be.I will try and post my current script when I get a chance.
  3. .... and your english is perfect!!
  4. Yes, I am required to use the PEAR mail package to enable me to access SMTP due to the way the hosting is setup. I was previously using php mail so have not had any experience of using PEAR.I have a working test page for the mail but the code will be processing many different areas of a website and sending some important emails out so I need to be sure it is working correctly and its not my email client that is self correcting badly formed headers for me.
  5. I am not sure of the correct way to use headers when sending mail over SMTP from within PHP. I was using PHP mail but now need to use SMTP authenification to send mail from within the code. The message body is currently using $messagebody = rtrim(chunk_split(base64_encode($messagebody))); So the headers need the correct encoding setting which was $headers = "MIME-Version: 1.0" . "\r\n";$headers .= "Content-Transfer-Encoding: base64" . "\r\n";$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; when I was using PHP. How is this set when using SMTP as they require an array a
  6. I need to know the best data type to use to store a potentially large amount of data in a single field on a single row.It is in the format 12345678912->999->999.99-> This is one string, with additional strings being combined to look like 12345678912->999->999.99->12345678912->999->999.99->12345678912->999->999.99-> I could have anything from 1 string to several thousand strings worth of data stored in the same field. I previously used varchar(5000) as the combined string would never exceed 5000 characters in length but this has now changed and the string whe
  7. I tested the update using 100 boxes which is about the most I will see on the page and the javascript was slowing the page down slighty which was a problem as the page cant afford for this to happen.I made a different solution using a simple mouseover on each textarea that fetches the latest content for the textarea from the mysql server and redisplays it in the textarea. As a user puts there cursor in the textarea to type a message it activates the update and redisplays the message before they can type over it. As it only affects each textarea individually it massively reduces the update time
  8. The issue I have is how to update multiple textarea boxes on the same page. They are created dynamically so numbers can be anywhere from 1 to 100 boxes, each linked to a different row in the database. If it was just updating 1 box then I could achieve this with some JS but with so many boxes I can see it struggling to handle the volume. Any ideas how to get round this, I can't reduce the number of boxes.
  9. If you are trying to have a different colour for each language then you could create a class for each language with a different colour and span the relevant languages with the class, if they are mixed together then this is more complicated.
  10. I am looking at adding the ability to force all users viewing a page to receive an update to the page (a new text entry) at the moment that it is added by another user, something similar to they way chat rooms work.The active part that needs to show the live updates will be text in a textarea field. Currently any text typed into the textarea is automatically inserted into a database with the use of javascripts onkeyup() and some ajax. Other users are required to refresh there page to see the latest updates in the textbox and this is the bit that I would like to avoid.I haven't ever needed to d
  11. I have ended up running 2 feeds, one for the sites require ISO-8859-1 and one for the site requiring UTF-8. I have changed the headers to UTF-8 and run the data pulled from the database through htmlspecialchars() with UTF-8 and then through the utf8_encode() function which seems to have resolved the pound sign.Strangely when viewing the code it hasnt encode the pound sign (its still £) but it now displays correctly. If I take the utf8_encode out of the script it fails with the pund sign again depsite still being displayed as £ in the code.
  12. Ah... think I have a solution for the cookie issue that should cover this anyway so will try that first.
  13. I realise the mistake I have made, should have read the manual in more depth.What is the best method to detect if a user has been to the website previously without using cookies or sessions.
  14. I am using PHP to set a cookie and have a problem with detecting the cookie afterwards.In the script I check if cookie exsits with if(isset($_COOKIE["abc"]))if it does then I make a change to the expiry dateif it doesnt then I create a cookie with setcookie....I then check again to see if the cookie now exists and at this point the check says it doesnt exists and therefore displays my "please enable cookies message".I know that the setcookie works because if I reload the page the script detects the cookie correctly and no longer displays the message.Is this something to do with server side a
  15. The file is partly created with PHP so I am already encoding some of the content with htmlspecialchars. I guess simply changing the charset in htmlspecialchars to UTF-8 would not be enough as this would not cover the £. Am I better using utf8_encode or should I use both and in what order.I think the problem with why the feed doesnt display correctly on of the sites that use it is that the site that uses it is displaying in UTF-8.
  16. If i change the encoding to UTF-8 then the £ fails the RSS unless its encoded itself. Ideally I would like to keep the £ as a £ without having to encode it.
  17. I have created an RSS feed with a ISO-8859-1 character set but I am having issues with how its displayed.Two of the places the RSS feed is displayed in show a pound sign as £ whilst the third shows a square. They are all set to treat the RSS feed as ISO-8859-1.What is the correct way to write a £ in a ISO-8859-1 RSS feed, can it be written as £ or does it need encoding.
  18. The end result I am trying to achieve is the same as printing the array when array_count_values has been applied to it.A bit likething1 - 50thing2 - 47thing3 - 6
  19. I have a database with a potentially large amount of entries (1 field per row of VARCHAR 200). I am current pulling the data out and using array_count_values on the data to achieve the result I require. Is it better (faster and more effecient) and indeed possible to perform something similar to array_count_values from within the mysql code before pulling the data out, rather than creating a very large array and using array_count_values.
  20. The main reason behind the law was to data security, in that cookies contain login details that you are retrieving from the clients PC without permission.This makes little sense since the cookies was placed there by the website in the first place and any decent cookies dont include any login details in a cookie(like username and password) but use a randon character string that is only any use to the originating website.Its as daft a law as the one about selling bent bananas.
  21. It depends on mnay factors including the print margins used. The best option is to max a div with a border and play around with the width and height until you get the result you want then use that div as a container for the sites information.
  22. A new law regarding the use of cookies on websites in the EU is coming into effect, more info at http://www.bbc.co.uk/news/technology-13541250.The basic rule is that if a website wants to use cookies then it must first ask the user if they agree for it to place a cookie on their device.This obviously raises many issues as to how best go about asking every user to the site if they wish to allow cookies.What are peoples opinions on the way that this is likely to go and how would you comply with this law?
  23. Can you post the php script, its hard to help without seeing it. Does the script make use of cookies?
  24. I am about to begin developing an online photogallery that will allow anyone to upload images to appear online. I am concerned over tthe potential security risk of allowing the public access to upload to the server.I know how to check file types before saving to the server using PHP so can limit uploads to just jpg for example but I wondered if I need any further security checks, or if the php file type check can be bypassed by a hacker.I will be saving the filenames and a small description for each image in a database online. The data going into this will be passed through normal security che
  25. Look at using CSS to float the image with float:left; You can add that into your JS with an inline style.
  • Create New...