Log in

View Full Version : Php help please :)



Jamie.
15-08-2006, 06:30 PM
<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($fp, 4096))
xml_parse($xml_parser, $data, feof($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 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?

Wayne. (Super Moderator) Thread closed to prevent further arguments. Feel free to create a new thread.

joert
15-08-2006, 06:33 PM
did u write all that out omg geek

Wayne. (Super Moderator) Please don't offend other forum users.

Hitman
15-08-2006, 06:35 PM
did u write all that out omg geek

Please don't try and cause an arguement... :$

Urm, I'm new with PHP, and I'm not that advanced. I'm sure somebody will know ;)

NellyMc
15-08-2006, 06:36 PM
Lmao :\
did u write all that out omg geek

Wayne. (Super Moderator) Please stay on topic.

Jamie.
15-08-2006, 06:37 PM
did u write all that out omg geek

1) i am not a geek
2) i did not write it, i searched webdesign section "rss"
3) get out my thread kthnxbi

Wayne. (Super Moderator) Please stay on topic.

joert
15-08-2006, 06:45 PM
sos geeks i will let u get on making ur php geek things

Wayne. (Super Moderator) Please stay on topic/stop offending other members.

Jamie.
15-08-2006, 06:52 PM
sos geeks i will let u get on making ur php geek things

Right let me get this straight, unless u want me to come ure house n blow the door down n come rip ure **** off then u best shut ure mouth

Wayne. (Super Moderator) Please don't offend other forum users.

Hitman
15-08-2006, 06:53 PM
sos geeks i will let u get on making ur php geek things
Yes, we make our "geek" things because we can. Unlike you. ;)

Wayne. (Super Moderator) Please don't offend other forum users.

Jamie.
15-08-2006, 06:55 PM
Yes, we make our "geek" things because we can. Unlike you. ;)

Owned.

Wayne. (Super Moderator) Please stay on topic.

1
15-08-2006, 06:59 PM
Also making our geek things earns us on average 3.4 times as much as a normal person working full time in Tescos.

Wayne. (Super Moderator) Please stay on topic.

joert
15-08-2006, 07:02 PM
Yes, we make our "geek" things because we can. Unlike you. ;)

yeh i rly wanna be able to

Wayne. (Super Moderator) Please stay on topic.

Jamie.
15-08-2006, 07:12 PM
Yes, we make our "geek" things because we can. Unlike you. ;)


yeh i rly wanna be able to

Right you get out of this thread u r just winding it all up now i still need this php ritten kthnxbi

Wayne. (Super Moderator) Please stay on topic.

Want to hide these adverts? Register an account for free!