What public APIs are provided by Governments to the public?

Suddenly I feel proud to be a British Citizen… are you ready? Good: HMRC (the lovely people who take our tax off us) provide a fully documented API, see here, for filling in just about every form they have. Not only that, but they define a whole set of schemas and everything available here: http://www.cabinetoffice.gov.uk/govtalk/schemasstandards.aspx … Read more

Unescape HTML entities in JavaScript?

Most answers given here have a huge disadvantage: if the string you are trying to convert isn’t trusted then you will end up with a Cross-Site Scripting (XSS) vulnerability. For the function in the accepted answer, consider the following: htmlDecode(“<img src=”https://stackoverflow.com/questions/3700326/dummy” onerror=”alert(/xss/)”>”); The string here contains an unescaped HTML tag, so instead of decoding anything … Read more

Unescape HTML entities in JavaScript?

Most answers given here have a huge disadvantage: if the string you are trying to convert isn’t trusted then you will end up with a Cross-Site Scripting (XSS) vulnerability. For the function in the accepted answer, consider the following: htmlDecode(“<img src=”https://stackoverflow.com/questions/1912501/dummy” onerror=”alert(/xss/)”>”); The string here contains an unescaped HTML tag, so instead of decoding anything … Read more

Fatal Error: Allowed Memory Size of 134217728 Bytes Exhausted (CodeIgniter + XML-RPC)

Changing the memory_limit by ini_set(‘memory_limit’, ‘-1′); is not a proper solution. Please don’t do that. Your PHP code may have a memory leak somewhere and you are telling the server to just use all the memory that it wants. You wouldn’t have fixed the problem at all. If you monitor your server, you will see … Read more