OK, I have figured out that it's the second section (about
replacing " " with "_") that's the part that I need to work on, now,
I took the line:
// convert to lowercase
$txt=strtolower($txt);
and changed it to:
// convert to lowercase
$filename=strtolower($title);
then did this
$filename=substr(str_replace(" ","_",$title),0,20).".html";
$filename=strtolower($title);
It didn't work, how can I add that to the above line and make it
work? I think it needs to be all together in one line, but I don't
know the proper way to add it and make it work.
I also need to remove the characters [EMAIL PROTECTED]&*()+=\/`{}[]:;"'?<> and
remove the words: to, the, it, and, or, with, too, also, an, if
Thanks in advance!
Wretha
//GENERATE AN HREF LINK AND ADD TO GLOBAL ARRAY
$hrefs[].="<a href='".urlencode($file_name)."'>".$href_text."</a>";
//SAVE THE ARTICLE INFO TO THE DB
if(put_article($data)==true){//echo"article saved to DB<br>";
}
}
function save_article($html,$title)
{//echo "saving $title<br>";
global $save_dir;
$filename=substr(str_replace(" ","_",$title),0,20).".html";
//$path=$save_dir.$filename;
//echo $filename."__path__<br>";
if (!write_file($html,$filename)) {echo "cant save
file:$filename. ";return false;}
else {return $filename;}
}
?>
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/