Use curl_setopt ($ch, CURLOPT_RETURNTRANFER, 1), but still output the page

Code
$url = "http://www.baidu.com";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch); // 
curl_close($ch);
var_dump($response);

clipboard.png

clipboard.png

the ideal result is to output HTML element tags;
Php
Mar.18,2021

? Didn't you output it yourself


var_dump (htmlentities ($response));

convert characters to HTML escape characters

otherwise the characters you get will be parsed by the browser.

htmlentities

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e473bb-44c28.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e473bb-44c28.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?