PHP USES CURL forgery to crawl pages or files
- 2020-05-05 11:02:31
- OfStack
// Initialize the
$curl = curl_init();
// The url to visit
curl_setopt($curl, CURLOPT_URL, 'http://asen.me/');
// Set the route
curl_setopt($curl, CURLOPT_REFERER, 'http://google.com/');
// No direct input
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
// Health results are stored in $result In the
$result = curl_exec($curl);
// Shut down
curl_close($curl);
Note that with this method, make sure your PHP environment supports and the CURL module is enabled.