Bookmark Count: {$bookmarkCount}, Like Count: {$likeCount}, Comment Count: {$commentCount}
\n";}}
?>
{$artLink} \n";
$numLinks++; // Increment the link counter
if ($numLinks >= 4) {
return; // Break after 4 links are found
}
} else {
foreach ($artworks as $artId => $art) {
$artLink = "https://www.pixiv.net/artworks/{$artId}";
echo "{$artLink}»\n";
$numLinks++; // Increment the link counter
if ($numLinks >= 4) {
return; // Break after 4 links are found
}
}
}
// Display the number of links found within the div
echo "";
} else {
echo "No artworks found for the given user.";
}
}
// Usage example
$userId = isset($_GET['userId']) ? $_GET['userId'] : '75406576';
$random = isset($_GET['random']);
getPixivUserArt($userId, $random);
?>