========JS Ver Start =====
========JS Ver End ===== <?php function getAllTitlesAndGuidLinks($url) { try { $xml = simplexml_load_file($url); if ($xml === false) { throw new Exception('Failed to load RSS feed'); } foreach ($xml->channel->item as $item) { $guid = (string) $item->guid; $title = (string) $item->title; $content = (string) $item->description; $firstParagraph = extractParagraph($content); $wrappedTitle = "<a href=\"{$guid}\" target=\"_blank\">{$title}</a>"; echo "<b>{$wrappedTitle}</b> {$firstParagraph}"; } } catch (Exception $e) { echo 'Error: ' . $e->getMessage(); } } function extractParagraph($content) { $regex = '/<p>(.*?)<\/p>/'; preg_match($regex, $content, $matches); return isset($matches[0]) ? $matches[0] : null; } $pixivUserUrl = 'https://rsshub.app/pixiv/user/75406576'; getAllTitlesAndGuidLinks($pixivUserUrl); ?> <!---<?php function getAllTitlesAndGuidLinks($url) { try { $apiUrl = "https://api.rss2json.com/v1/api.json?rss_url=" . urlencode($url); $response = file_get_contents($apiUrl); $data = json_decode($response, true); foreach ($data['items'] as $item) { $guid = $item['guid']; $title = $item['title']; $firstParagraph = extractParagraph($item['content']); $wrappedTitle = "<a href=\"{$guid}\" target=\"_blank\">{$title}</a>"; echo "<b>{$wrappedTitle}</b> {$firstParagraph}"; } } catch (Exception $e) { echo 'Error: ' . $e->getMessage(); } } function extractParagraph($content) { $regex = '/<p>(.*?)<\/p>/'; preg_match($regex, $content, $matches); return isset($matches[0]) ? $matches[0] : null; } $pixivUserUrl = 'https://rsshub.app/pixiv/user/75406576'; getAllTitlesAndGuidLinks($pixivUserUrl); ?>--->