UPDATE2:
i tried this piece of code, but still no echo, i valued my cookie to 3 for just test
<?php ?>
<script type="text/javascript">
date = new Date();
ms = (date.getHours() * 24 * 60 * 1000) + (date.getMinutes() * 60 * 1000) + (date.getSeconds() * 1000) + date.getMilliseconds();
alert(ms);
document.cookie += 'test=3';
</script>
<?php
echo $_COOKIE['test'];
?>
UPDATE1:
i tried this: did i do it right? it did not echo anything.
<?php ?>
<script type="text/javascript">
date = new Date();
ms = (date.getHours() * 24 * 60 * 1000) + (date.getMinutes() * 60 * 1000) + (date.getSeconds() * 1000) + date.getMilliseconds();
$.get("test.php", { test: ms } );
</script>
<?php
echo $test;
?>
ORIGINAL POST:
well basically i'm on a site with cURL, but everytime i want to change the location where i am, i need to post an extra variable ms to the site..so for example
POST /chat.php?cg=0&ms=23585666
the ms value comes from javascript, but how i get the value to my PHP code to send it out with cURL post?
<script type="text/javascript">
date = new Date();
ms = (date.getHours() * 24 * 60 * 1000) + (date.getMinutes() * 60 * 1000) + (date.getSeconds() * 1000) + date.getMilliseconds();
</script>
so eventually it goes to my cURL postfields
$data = array('ms' => $VARIABLE_MS_FROM_JAVASCRIPT, 'cg' => 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);