Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Rss Feed Pomoc

[es] :: PHP :: Rss Feed Pomoc

[ Pregleda: 2570 | Odgovora: 7 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

bosnier
Denis Ahmetovic
PornPub.info
Sarajevo

Član broj: 252339
Poruke: 62
77.238.220.*

Sajt: www.youbunny.com


+1 Profil

icon Rss Feed Pomoc05.05.2010. u 20:42 - pre 169 meseci
Pozdrav,

Napravio sam RSS Feed za moj Adult sajt, ali nesto nije uredu, to jest kad ga otvorim pojavi mi se samo ovo

http://www.pornpub.info/rss.php

Evo sta sam uradio

Napravio sam fajl rss.php
I stavio ovaj code

Code:
    <? header('Content-type: text/xml'); ?>
    <? echo "<?";?>xml version="1.0" encoding="UTF-8"<? echo "?>";?>

    <rss version="2.0">
    <channel>
        <title>PornPub Rss Feed</title>
        <link>http://www.pornpub.info</link>
        <description>PornPub - Best Porn Videos from Biggest Porn Tube Sites!</description>
        <language>en-us</language>
    <?php
    include("includes/config.php");
    ?>
    <?
    $sql = "SELECT id, title, description, thumb FROM videos ORDER by id DESC LIMIT 25";
    $result = mysql_query($sql) or die(mysql_error());
    while($row = mysql_fetch_assoc($result)){
    ?>
    <item>
         <title><?=$row['title']; ?></title>
         <link>http://www.pornpub.info/video/<?=$row['id']."/".str_replace(" ","-",trim($row['title']))?></link>
         <guid>http://www.pornpub.info/video/<?=$row['id']."/".str_replace(" ","-",trim($row['title']))?></guid>
         <description><![CDATA[<p><a href="http://www.pornpub.info/video/<?=$row['id']."/".str_replace(" ","-",trim($row['title']))?>" title="<?=$row['title']; ?>"><img src="<?=$row['thumb']; ?>" alt="<?=$row['title']; ?>" /></a></p><p><?=$row['description']; ?></p>]]></description>
    </item>
    <?
    }
    ?>
    </channel>
    </rss>


Pa sam kasnije dodao ovo u header.html fajlu, izmedju heada

Code:
<link rel="alternate" type="application/rss+xml" title="PornPub (RSS 2.0)" href="http://www.pornpub.info/rss.php">


E sad ako moze neko da mi pomogne, da kaze gdje sam pogrijesio, prije toga nikad nisam pravio feed , a stvarno mi je neophodan zbog razmjene traffica

Hvala !
ratata
 
Odgovor na temu

Nikola Poša
Backend (PHP) developer
Beograd

Član broj: 173839
Poruke: 1616
*.adsl-3.sezampro.yu.



+33 Profil

icon Re: Rss Feed Pomoc05.05.2010. u 20:55 - pre 169 meseci
Probaj da u tom pozivu header() funkcije umesto "Content-type: text/xml" staviš "Content-Type: application/rss+xml".
 
Odgovor na temu

bosnier
Denis Ahmetovic
PornPub.info
Sarajevo

Član broj: 252339
Poruke: 62
77.238.220.*

Sajt: www.youbunny.com


+1 Profil

icon Re: Rss Feed Pomoc05.05.2010. u 21:22 - pre 169 meseci
Evo pokusao sam, ali opet nista :(

Hvala
ratata
 
Odgovor na temu

stankons
Stanko Milošev
ise Gmbh, Deutschland
Bonn

Član broj: 99408
Poruke: 231
*.trinet.si.

ICQ: 147767352
Sajt: www.milosev.com


Profil

icon Re: Rss Feed Pomoc06.05.2010. u 07:33 - pre 169 meseci
Imaš višak ]]>, čini mi se da to dolazi od dela:

<?=$row['description']; ?></p>]]></description>

Konkretno deo:

>]]

Osim toga ne razumem u čemu je problem?
 
Odgovor na temu

bosnier
Denis Ahmetovic
PornPub.info
Sarajevo

Član broj: 252339
Poruke: 62
77.238.220.*

Sajt: www.youbunny.com


+1 Profil

icon Re: Rss Feed Pomoc06.05.2010. u 10:55 - pre 169 meseci
Opet isto :(
ratata
 
Odgovor na temu

stankons
Stanko Milošev
ise Gmbh, Deutschland
Bonn

Član broj: 99408
Poruke: 231
*.trinet.si.

ICQ: 147767352
Sajt: www.milosev.com


Profil

icon Re: Rss Feed Pomoc06.05.2010. u 11:15 - pre 169 meseci
Isto šta? Šta je konkretan problem?
 
Odgovor na temu

Predrag Gajic

Član broj: 23671
Poruke: 338



+2 Profil

icon Re: Rss Feed Pomoc06.05.2010. u 13:04 - pre 169 meseci
Mozda ovako nešto?

Code:
<?php
header("Content-Type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?><rss version=\"2.0\">\n";
echo"<channel>
        <title>PornPub Rss Feed</title>
        <link>http://www.pornpub.info</link>
        <description>PornPub - Best Porn Videos from Biggest Porn Tube Sites!</description>
        <language>en-us</language>";

   include("includes/config.php");
  
  
 $sql = "SELECT id, title, description, thumb FROM videos ORDER by id DESC LIMIT 25";
  $result = mysql_query($sql) or die(mysql_error());
   while($row = mysql_fetch_assoc($result)){
    ?>
   <item>
         <title><?=$row['title']; ?></title>
         <link>http://www.pornpub.info/video/<?=$row['id']."/".str_replace(" ","-",trim($row['title']))?></link>
         <guid>http://www.pornpub.info/video/<?=$row['id']."/".str_replace(" ","-",trim($row['title']))?></guid>
         <description><![CDATA[<p><a href="http://www.pornpub.info/video/<?=$row['id']."/".str_replace(" ","-",trim($row['title']))?>" title="<?=$row['title']; ?>"><img src="<?=$row['thumb']; ?>" alt="<?=$row['title']; ?>" /></a></p><p><?=$row['description']; ?></p>]]></description>
    </item>
    <?
 }
   
  echo"</channel>\n
    </rss>\n";
    ?>
 
Odgovor na temu

bosnier
Denis Ahmetovic
PornPub.info
Sarajevo

Član broj: 252339
Poruke: 62
77.238.220.*

Sajt: www.youbunny.com


+1 Profil

icon Re: Rss Feed Pomoc06.05.2010. u 19:03 - pre 169 meseci
Evo ga radi sad !

Puno se zahvaljujuem Predragu na codu !

I svima koji su pomogli !

HVALA :D
ratata
 
Odgovor na temu

[es] :: PHP :: Rss Feed Pomoc

[ Pregleda: 2570 | Odgovora: 7 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.