"is there a javascript way to do file_get_contents()?" Answer’s


you could do

JS code:

$.post('phppage.php', { url: url }, function(data) {
    document.getElementById('somediv').innerHTML = data;        

PHP code:

$url = $_POST['url'];
echo file_get_contents($url);

That would get you the contents of the url.

Wednesday, March 31, 2021
answered 11 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :