Jump to content

Capture website code and send to PHP

Go to solution Solved by maxxd,

Recommended Posts

Hi. Not too sure how to word this right. I remember once when I was learning how to send javascript variables to PHP, I accidentally sent a capture of the entire index.php.

Ive been trying to find the answer online but I guess im not wording it right. Does anyone know how to do this?

Link to comment
Share on other sites

  • Solution

It sounds like you're looking for information on AJAX. You can send information from JavaScript to php, process it on the server side in php, and return data to your client-side JavaScript. Here's information on using JQuery - it makes AJAX calls easier to deal with.

  • Like 1
Link to comment
Share on other sites

Thanks alot, got the ball rolling :)

So incase anyones new and interested too, to capture the dynamic state of the HTML you only need

var x = $("body").html();

To capture the saved state of a file and send via aJax

        url: "fileName.php",
        type: "POST",
        dataType: "text",
        success: function(data) {

I'm not sure how to capture dynamic variables in Javascript though. I suppose it just needs a script to update an array, then send the array that way.

Thanks for the info maxxd

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.