ravindar.dev
ravindar.dev

Reputation: 114

Saving the output of a php script having lots of jquery ajax function working together to anew file

I have a php script at http://www.seooutlook.info/Testing_only/seo_latest/ (PLZ USE ONLY GOOGLE.COM as working example) which have loads of j query Ajax function which fire as soon as document load .

now i want to save the output of the file to a new file.

and the code iam using is this

file_put_contents("../site/$site_name", ob_get_contents());

But the output of the file is not same as when it is executed fully,It miss all the thing which are fetched by j query function .

any help would be appreciated .. Thanks

Upvotes: 0

Views: 98

Answers (1)

user788472
user788472

Reputation:

PHP runs server-side; JavaScript runs client-side. That means that the PHP has already run before any of your JavaScript functionality runs. To accomplish your objective you will probably want to use another AJAX call and send the document to another PHP file that can do the write for you.

Upvotes: 0

Related Questions