I have this code that returns me the Google page.
<?php
$request = curl_init();
curl_setopt_array($request, [
CURLOPT_URL => 'https://www.google.com.br',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYPEER => false,
]);
$response = curl_exec($request);
curl_close($request);
echo $response;
However, it does not bring me the external links as an image among others. Notice that instead of it bring me google.com / ... it bears the name of my vHOST viperfollowdev.com , see the image below to understand.
Is there any way to fix this?
My second example was:
<?php
$request = curl_init();
curl_setopt_array($request, array(
CURLOPT_URL => 'https://www.instagram.com',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_SSL_VERIFYPEER => false,
));
$response = curl_exec($request);
curl_close($request);
$response = str_replace('/static/bundles/', 'https://www.instagram.com/static/bundles/', $response);
$response = str_replace('/static/images/', 'https://www.instagram.com/static/images/', $response);
$response = str_replace('/data/manifest.json', 'https://www.instagram.com/data/manifest.json', $response);
echo $response;
It's catching but it does not show yet on my page. I spent the whole url but it does not work.