Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: JS to PHP

  1. #1
    Regular Coder
    Join Date
    Aug 2006
    Posts
    135
    Thanks
    0
    Thanked 0 Times in 0 Posts

    JS to PHP

    Hi,
    I have an HTML page that has some JS functions. the BODY of the html is empty, and the important data I'm writing with one single "document.write" in JS.
    I'm trying to get this document.write value, using PHP. Can't really find a way with file_get_contents. What do you think, how can I do it?

    Thanks a lot!
    Last edited by b_hole; 03-11-2007 at 02:03 PM.

  • #2
    Regular Coder the-dream's Avatar
    Join Date
    Mar 2007
    Location
    Northamptonshire, UK
    Posts
    477
    Thanks
    8
    Thanked 4 Times in 4 Posts
    if i am understanding what you mean try

    readfile()

  • #3
    Regular Coder
    Join Date
    Aug 2006
    Posts
    135
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Unfortunately, I don't think that's what I'm looking for.

    Lets say I have a page called b.php. It has a HTML declaration, and some JS functions. In one of those functions, I use this:
    Code:
    var url = "<?echo $_GET['url'];?>";
    Then, at the end of this function, I use document.write() to print something.

    My other page called a.php. All I want is to get the value of document.write() from b.php in my a.php. Possible?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •