1
在Explore.php頁面上,我需要顯示Instagram用戶名和個人資料圖片,關注者和我使用Instagram.php頁面使用JSON來獲取數據。我在Instagram.php中添加了各種功能來獲取Instagram用戶的關注者,喜歡,生物,媒體。我如何增加在PHP中獲取Instagram數據
在Explore.php我用下面的代碼以HTML表格打印數據
$query = "SELECT * FROM ig_accounts WHERE confirmed = 1 LIMIT $limit, $rows_per_page";
$run_query = mysqli_query($conn, $query);
while($rows = mysqli_fetch_assoc($run_query))
{
$user_name = $rows['username'];
?>
<tr>
<td><img src="<?php echo profile_pic($user_name); ?>" width="30" height="30" class="img-circle"><a href="accounts.php?username=<?php echo $user_name?>">@<?php echo $user_name; ?> </a></td>
<td> <?php echo (followers($user_name))/1000; echo "k"; ?></td>
<td> $<?php echo $rows['account_amount']; ?> </td>
</tr>
<?php
}
此代碼的工作,但時間太長處理和打印Explore.php頁上的數據,有時我由於超時而導致500內部服務器錯誤。 反正有沒有提高代碼的處理?
我已經添加了upload_max_filesize = 12M,並且在瀏覽頁面上也出現了分頁,我想要的是提高執行速度而不是超時它:)非常感謝。感謝你的幫助 – shobhit99