Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2005
    Location
    -
    Posts
    2,995
    Tokens
    0

    Latest Awards:

    Default Php expert needed

    PHP Code:
    <style type="text/css"> 
    <!-- 
    a:link { 
        color: #000000; 

    a:visited { 
        color: #000000; 

    a:hover { 
        color: #FF0000; 

    --> 
    </style><font face="verdana" size="1">Hab-tunes Latest</br></br><?php 
    /* 

    */ 
    //url to rss feed of habbo site 
    $site "http://www.hab-tunes.com/cutenews/rss.php?number=2"

    //dont edit anything below this line! 
    $insideitem false
    $tag ""
    $title ""
    $description ""
    $link ""
    function 
    startElement($parser$name$attrs) { 
    global 
    $insideitem$tag$title$description$link
    if (
    $insideitem) { 
    $tag $name
    } elseif (
    $name == "ITEM") { 
    $insideitem true


    function 
    endElement($parser$name) { 
    global 
    $insideitem$tag$title$description$link
    if (
    $name == "ITEM") { 
    //echo's the content 
    printf("<dt><b><a href='%s'>%s</a></b></dt>"
    trim($link),trim($title)); 
    printf("<dd>%s</dd>",trim($description)); 
    $title ""
    $description ""
    $link ""
    $insideitem false


    function 
    characterData($parser$data) { 
    global 
    $insideitem$tag$title$description$link
    if (
    $insideitem) { 
    switch (
    $tag) { 
    case 
    "TITLE"
    $title .= $data
    break; 
    case 
    "DESCRIPTION"
    $description .= $data
    break; 
    case 
    "LINK"
    $link .= $data
    break; 



    $xml_parser xml_parser_create(); 
    xml_set_element_handler($xml_parser"startElement""endElement"); 
    xml_set_character_data_handler($xml_parser"characterData"); 
    $fp fopen("$site","r"
    or die(
    "Error reading RSS data."); 
    while (
    $data fread($fp4096)) 
    xml_parse($xml_parser$datafeof($fp)) 
    or die(
    sprintf("XML error: %s at line %d"
    xml_error_string(xml_get_error_code($xml_parser)), 
    xml_get_current_line_number($xml_parser))); 
    fclose($fp); 
    xml_parser_free($xml_parser); 
    ?> </font>
    I need the title(news title thing (link)) to open into a iframe named Main coz its on the side of my site (the rss feed) and i need the full story to open into the other iframe named Main so could anyone help?

  2. #2
    Join Date
    Feb 2005
    Location
    Leicestershire / Sheffield
    Posts
    685
    Tokens
    0

    Default

    iframes != php

    You need to add:
    target="iframename"
    to the links and change the iframename to the name of ur iframe

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •