title: How to get image from url and save it in mysql as BLOB ? php
body: <p>Clear form the question ,I'm using php for my backend , I want to get content of url image then insert it in mysql as BLOB type ? how to do this ? </p>
  
  <p>I tried this code : </p>
  
  <pre><code>&lt;?php
  $servername = "localhost";
  $username = "root";
  $password = "111";
  $dbname = "111";
  // Create connection
  $conn = new mysqli($servername, $username, $password, $dbname);
  
  
  $data = file_get_contents("https://images-na.ssl-images-amazon.com/images/M/MV5BMTI3ODc2ODc0M15BMl5BanBnXkFtZTYwMjgzNjc3._V1_UX182_CR0,0,182,268_AL_.jpg");
  
  
      $sql =  "UPDATE employee SET realPhoto='".$data."' WHERE id= 2";
  
  if ($conn-&gt;query($sql) === TRUE) {
  echo  ("true");
  
   } else {
  
  echo  ("false");
   }
  
  ?&gt;
  </code></pre>
  
  <p>I want something like this without using Imagick class , how ?</p>