hasti
6 days ago
246
15
General

how i store data from my browser to database directly

Posted 6 days ago by hasti

I made scrapper for a particular website so how can I store that data in CSV

this is my code

$items = $crawler->filter('.sg-col-20-of-24 .s-result-item  > div > div')->each(function (Crawler $node, $i)                        
{
    //echo  $node->html();

    $text =  $node->text();
    $image =  $node->filter('img')->attr('src');
    $item = [
            'image' => $image,
            'text' => $text
    ];
    return $item;
});

Please sign in or create an account to participate in this conversation.