How to save meta data of image from Instagram API?

Get instagram from the list the image tag.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, ""); 
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
 $output = curl_exec($ch); 
$jsonData = json_decode($output);

Output to the screen
$tags = "";
 for($j=0; $j<count($jsondata->data[0]->tags); $j++)
 if($j!=0) $tags .= ", "; 
 $tags .= "#".$jsonData->data[0]->tags[$j];

 for($j=0; $j<count($jsondata->data); $j++){

 echo '<div class="cls_img">
 <a href="'.$jsonData->data[$j]->link .'" target="_blank">
 <div class="img">

 <img src="'. $jsonData->data[$j]->images->standard_resolution->url .'"> 

 <div class="info" id="heading0">
the <h3>
 '. $tags .'
 <p>'. $jsonData->data[$j]->caption->text.'</p>


How to implement such functionality. From the list of image to store in the database only those which the user has selected. Ie it is necessary to keep the link, description, and tags of the photo.
July 8th 19 at 16:11
1 answer
July 8th 19 at 16:13
Check saved user and just insert to the base data, photos of course there no need to push, it will go to a folder, and here is a link to a photo (on your website) will go in database.

Find more questions by tags JavaScriptPHPWordPressMySQLInstagram