Ok, I got the first draft to work, now I have a problem. I need to parse some very strange code, I will post a example:
<p class="MsoNormal"><span style="mso-bidi-font-size:12.0pt;font-family:Verdana;
color:white"><font size="4">Could be Saturday before some get power</font></span><span style="mso-spacerun: yes; mso-bidi-font-size: 12.0pt; color: white">
</span><span style="font-size:11.0pt;font-family:Verdana;color:white">Ronni
Chase </span><st1:date Year="2002" Day="13" Month="11">
<span style="font-size:
11.0pt;font-family:Verdana;color:white">11-13-02</span></st1:date>
<span style="font-size:11.0pt;font-family:Verdana;color:white"><o:p>
</o:p>
</span></p>
<p class="MsoNormal"><span style="color:white"> </span><span style="font-size:13.5pt;color:white"><o:p>
</o:p>
</span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;color:white">About
850 people were still without power Wednesday morning here in </span></b><st1:place>
<st1:PlaceName>
<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;color:white">Cumberland</span></b></st1:PlaceName>
<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;color:white">
</span></b><st1:PlaceType>
<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;color:white">County</span></b></st1:PlaceType>
</st1:place>
<span style="font-size:12.0pt;color:white"><b style="mso-bidi-font-weight:normal">.<span style="mso-spacerun:yes">
</span>Bobby Randolph, Volunteer Energy Manager for the Crossville Area
says crews continue to work to restore electricity to those in the hardest
hit areas.<span style="mso-spacerun:yes"> </span>Those closest to
the tornado strike zone in Tansi and Pidgeon Ridge will be among the last
to have electrical service restored, hopefully by Saturday if not sooner.<span style="mso-spacerun:yes">
</span>Anyone without power in areas other than the southern half of
Cumberland County should call VEC.<span style="mso-spacerun:yes"> </span>Phone
lines will be open 24 hours to report outages</b><b style="mso-bidi-font-weight: normal; font-size: 12.0pt; color: white">.</b><b style="mso-bidi-font-weight:normal"><o:p>
now I only want to code that is formated like this:
"><font size="4">Could be Saturday before some get power</font>
Now here is the code that I am using to parse it off
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$text = array();
$newtext = array();
$word = "";
$page = "http://localhost/news.html";
$fp = fopen( $page, "r" ) or die("couldn't open $page");
while ( ! feof( $fp ))
$text[] = fgets( $fp, 1024 );
reset($text);
foreach($text as $key => $value)
{
if (preg_match ("/<P class=MsoNormal>.*?<FONT size=4>/i", $value))
{
$word = strip_tags($value);
ereg_replace("<P class=MsoNormal><SPAN style='COLOR: white; FONT-FAMILY: Verdana'><FONT size=4>", " ", $value);
$word = ereg_replace("</FONT></SPAN>", " ", $word);
$newtext[] = $word;
print strip$word;
}
else
{
unset($text[$key]);
}
}
?>
<APPLET code="AcuteScroller.class" archive="AcuteScroller.jar" width="420" height="22" codebase="/">
<PARAM name="Message" value="
<?php
foreach($newtext as $key => $value){
echo "<News> <link url='http://www.wow102.com/news.html' URL-Frame='_blank'>";
print strip_tags($value);
echo "</link></News>";
}
?>
"><PARAM name="Style" value="
<default
Text-Size='11'
Text-Font='Helvitica'
Text-Color='FFFF00'
Text-Bold='true'
Background-Color='000000'
Border-Color='FFFF00'
Border-Type='full'
Border-Width='1'
Align='center'
Padding-Top='2'
Scroll-Pause='8000'
Scroll-Speed='10'>
<h Text-Size='11'
Text-Color='FFFF00'
Padding-Top='1'>
</h
Padding-Bottom='1'>
<link
Text-Color='FFFF00'
Text-Color-Over='FFFFFF'
Text-Size='11'
Text-Bold='true'
Text-Underline='false'
Padding-Top='1'
Line-Break='false'
Align='center'>
<Easter
Section-Header='true'
Background-color=
'000000'>
<News
Section-Header='true'
Background-color=
'000000'>
"><param name="Domain-Keys" value="12157">
</APPLET>
</body>
</html>
now that takes it off and puts it into a news ticker and links back to the news page. Well it wont parse the info off that I want. What am I doing wrong???😕