Start coding and we'll help you along here. The following checklist could help you to make up the ultimate html text:- Remove all embedded (possible) code
- Filter all 'dirty' and not-allowed words out
- Replace bb-code tags by HTML tags (incl. imgage placement)
- Replace free-format URLs with <a href...> elements
- Replace \n and \n\r line breaks with <br />
Ronald
Thanks, trying my best to come up with the right code..
I acctually found a code, but it's in asp.net:(..
Trying too look at it, figure how I can write the code in php..
[HTML]<%@ Import Namespace="System.IO" %>
<script language="C#" runat="server">
void ProcessButton(Object sender, EventArgs e) {
string f = Server.MapPath(theFile.Text);
StreamWriter sw = File.CreateText(f);
sw.Write(theContents.Text);
sw.Close();
theMessage.Text = "Created file: <a href=\"" + theFile.Text + "\">" + theFile.Text + "</a>";
}
</script>
<html>
<body>
<h2>Create an HTML File</h2>
<form runat="server">
HTML Text:<br>
<asp:TextBox id="theContents" runat="server"
TextMode="MultiLine"
Columns=50
Rows=10
/>
<br>
<br>
File Name: <asp:TextBox id="theFile" runat="server"/>
<asp:Button id="theButton" runat="server"
OnClick="ProcessButton"
Text="Create File"
/>
<br>
<br>
<asp:Label id="theMessage" runat="server"/>
</form>
</body>
</html>[/HTML]