0
I have this code that returns me to the Google page.
<?php
$request = curl_init();
curl_setopt_array($request, [
CURLOPT_URL => 'https://www.google.com',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYPEER => false,
]);
$response = curl_exec($request);
curl_close($request);
echo $response;
However, it does not bring me external links as image among others. Note that instead of it bring me google.com/... it brings 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 picking up but it doesn’t show yet on my page. I went to url entire but not working.
Thank you, it worked, look at my second example in my almost similar question, only its more organized.
– user94336