Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3977250
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:54:05+00:00 2026-05-20T04:54:05+00:00

UPDATE2: i tried this piece of code, but still no echo, i valued my

  • 0

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);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:54:05+00:00Added an answer on May 20, 2026 at 4:54 am

    javascript is always executed after server-side php code.
    you can make an ajax request in Javascript for example with jQuery:

    <script type="text/javascript">
    date = new Date();
    
    ms = (date.getHours() * 24 * 60 * 1000) + (date.getMinutes() * 60 * 1000) +      (date.getSeconds()     * 1000) + date.getMilliseconds();
    
    
    $.get("doCURL.php", { VARIABLE_MS_FROM_JAVASCRIPT: ms } );
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this piece of code in my routine but it doesnt seem to
I´ve got this code inside a php file. It should show and hide a
I get this problem in IE7 when running a piece of code that uses
OK, I have this piece of code, var record = new Object(); //var aData
I tried to update an fullcalendar event with updateEvent but only the first time
When I run this code on my computer with the help of Google App
I used the following piece of code to read data from files as part
So I have tried to find a answer but must not be searching correctly
In real life it is piece of cake, but how you get derivative of
I need to let a piece of code always run independently of other code.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.