2012-03-30 18 views
0

我有顯示的用戶圖像列表(已允許訪問應用程序)。當用戶從他們的照片列表中選擇圖像時獲取圖像URL

<div class="list inline"> 
    $i = 0; 
    foreach ($photos as $photo) { 
     // Extract the pieces of info we need from the requests above 
     $id = idx($photo, 'id'); 
     $picture = idx($photo, 'picture'); 
     $link = idx($photo, 'link'); 

     $class = ($i++ % 4 === 0) ? 'first-column' : ''; 
?> 
<li style="background-image: url(<?php echo he($picture); ?>);" class="<?php echo $class; ?>"' 

我需要允許用戶選擇一個。當他/她做我可以得到該圖像的唯一ID或URL加載到一個不同的API嵌入到項目通過(通過src也許???)

任何幫助將不勝感激。謝謝。

回答

2

不知道你的意思,但也許你可以下載本地圖像,然後在任何你想要的api中使用它?

file_get_contents($picture); 
相關問題