RSS Maker, Klasa, PHP 4 i 5 |
RSS Maker, Klasa, PHP 4 i 5 |
10.10.2004, 19:18:47
Post
#1
|
|
Administrator PHPedia.pl Grupa: Developerzy Postów: 1 102 Pomógł: 2 Dołączył: 14.09.2003 Ostrzeżenie: (0%) |
Dziś popołudniu nie miałem co robić i napisałem klasa do generowania plików rss.
A oto przykład wykorzystania jej
Klasa ta jest zgodna ze specyfikacją 1.0 Zapraszam do testowania, zgłaszania propozycji zmian. -------------------- |
|
|
10.10.2004, 20:43:42
Post
#2
|
|
Administrator serwera Grupa: Przyjaciele php.pl Postów: 909 Pomógł: 0 Dołączył: 12.08.2003 Skąd: /var/www/wroclaw.php Ostrzeżenie: (0%) |
Zmienił bym tylko jedną rzecz, co jak na nadwornego marudę i tak jest dobrym wynikiem
Nie dawałbym możliwości bezpiśredniego ustawinia zmiennych... Czyli nie $klasa->zmienna "coś"; tylko '$klasa->set_zmienna("cos"); Na tym koeniec 9+/10 ale odrazu mówię, że jej nie testowałem, tylko przeglądnąłem kodzik... -------------------- Powrót do przeszłości :)
|
|
|
10.10.2004, 22:48:58
Post
#3
|
|
Administrator PHPedia.pl Grupa: Developerzy Postów: 1 102 Pomógł: 2 Dołączył: 14.09.2003 Ostrzeżenie: (0%) |
Cytat Nie dawałbym możliwości bezpiśredniego ustawinia zmiennych... gdyby to było php5 to ok, ale w php4 nie ma przecież modyfikatorów dostępu -------------------- |
|
|
12.10.2004, 20:56:32
Post
#4
|
|
Grupa: Zarejestrowani Postów: 362 Pomógł: 0 Dołączył: 18.02.2004 Skąd: Knurów Ostrzeżenie: (0%) |
Moja wersja na PHP5:
rss.class.php:
rss.test.php:
Proszę o opinie i ew. sugestie. Ten post edytował matid 12.10.2004, 20:59:38 |
|
|
25.02.2005, 18:19:14
Post
#5
|
|
Grupa: Zarejestrowani Postów: 691 Pomógł: 0 Dołączył: 19.01.2005 Skąd: Warszawa Ostrzeżenie: (0%) |
O ile pamiętam, w jednym pliku RSS może być tylko 15 <item>'ów.
Czyli trzeba przerobić funkcję showAll (odnoszę się do 1 skryptu). A dokładniej trzeba przerobić pętlę foreach... tylko jak to zrobić?? -------------------- |
|
|
Wersja Lo-Fi | Aktualny czas: 24.09.2024 - 12:43 |