При попытке запустить приложение в localhost у меня не получилось загрузить поток кафеля: `C: \ wamp64 \ bin \ php \ php7 .2.18 \ extras \ ssl \ cacert.pem ', но я настроил свой php .ini:
curl.cainfo ="C:\wamp64\bin\php\php7.2.18\extras\ssl\cacert.pem"
openssl.cafile="C:\wamp64\bin\php\php7.2.18\extras\ssl\cacert.pem"
мой код: -
<?php
use Illuminate\Support\Carbon;
use Intervention\Image\Facades\Image;
use Goutte\Client;
Route::get('/', function () {
$client = new Client();
$crawler = $client->request('GET', 'https://laracasts.com/skills/laravel');
$crawler->filter('img')->each(
/**
* @param $node
*/
function ($node) {
$currentData = carbon::now()->toDateString();
$img = $node->attr('src');
$imageName = pathinfo($img, PATHINFO_EXTENSION);
$image = $currentData . "-" . uniqid() . "." . $imageName;
$file = file_get_contents('https://laracasts.com/skills/laravel');
// $save =file_put_contents( public_path('image/'.$image),$file);
}
);
return view('welcome');
});
я новичок ie учусь программировать, пожалуйста, помогите мне в этом отношении.