How can I get the source code from another site by the php code

I am using the free hosting site … 000webhost.com .
my code is :

<?php
 $ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, 'http://www.google.com'); 
curl_setopt($ch, CURLOPT_HEADER, 1); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
$data = curl_exec($ch); 
curl_close($ch); 
 echo $data; // For test vision
?>

I get the source code from some free domain site (like- .tk, .cf etc) .
But I want for all sites. I am new in php .so, plz help me with code and full discussion… Thanks

Hi @Pagla_Dj and welcome to te form.

This thread may be useful:

Use the API that the other site provides for the purpose - if they don’t have one then likely their content is copyright and they don’t want people stealing it.

2 Likes

It is steal !!!, . I simply get all sources from the browser but I want learn this by programming way. it is not steal .

No one here is going to help you to do that. We don’t have the resources to pay millions of dollars in fines even if you do.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.