Im using file_get_contents()
and the source is a url. Im also using ajax to insert html into the page.
The page when loaded:
<div>
<!-- Html goes here when the insert button is pressed -->
<input type="button" onclick="insertHtml()" value="insert"/>
<input type="button" onclick="saveThisPage()" value="save"/>
</div>
And when html is added dynamically with ajax:
<div>
<!-- Html goes here when the insert button is pressed -->
<div>Some text here...</div>
<div>Some text here...</div>
<div>Some text here...</div>
<input type="button" onclick="insertHtml()" value="insert"/>
<input type="button" onclick="saveThisPage()" value="save"/>
</div>
Now I want to save what file_get_contents()
returns and store the data into the mysql database.
I press the "save" button and a query is sent to a php file to read the page (url source) ...except what is saved is the content when loaded WITHOUT the new data i.e
<div>Some text here...</div>
What do I do? What function(s) do I use?