March 29, 2013

it's become somewhat au courant to use the "type" attribute to mark <script> blocks that you don't want to be evaluated:

<script type='text/html-template'>
<div> this is a template </div>
</script>

By giving a weird non-JavaScript type, you get a way to stuff raw
text into the page for use by other JavaScript code (which is presumably
in script block that can be evaluated).

This technique is great for using the block inside the <script> for html template, to be used by JQuery. Without the <script> block, IE will mess with the source code and remove thing it does not know.

March 15, 2013

socket_sendto(socket_create(AF_INET, SOCK_DGRAM, SOL_UDP), $raw_post_data, strlen($raw_post_data), 0, '127.0.0.1', 57000);The above will send the post data (suppose it is in $raw_post_data) to a local udp server listening on port 57000.