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

0

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
 
Manju
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 :
 
Share