• 20-04-2020, 23:48:01
    #1
    Merhaba arkadaşlar. Bir siteye bot yazdım. Post ugönderiyor ve 1 tane dosyası gönderiyorum çalışıyor. Şimdi databsemden çektiğim fotoğraları göndermek istiyorum nasıl yapa bilirim? bu döngü nasıl kurulmalı ?
    CURLOPT_POSTFIELDS => [
    'file[0]' => new CURLFile('index0.jpg', 'image/jpeg'),
    'file[1]' => new CURLFile('index1.jpg', 'image/jpeg'),
    'file[2]' => new CURLFile('index2.jpg', 'image/jpeg')
    ]
  • 21-04-2020, 10:57:51
    #2
    Bu şekilde dene hocam:

    curl_setopt(
    $request,
    CURLOPT_POSTFIELDS,
    array(
    'blob[0]' => '@' . realpath('file-1.jpg'),
    'blob[1]' => '@' . realpath('file-2.jpg')
    )
    ));