coolcat50
Nov 3 2007, 12:03 AM
Yes, yes. I have another script that I have written and I am distributing. I am not entirely sure if this works. I have not tested it yet, but I will later and post back with a demo and fix it up. Current script: CODE <?php //Save this as something like htmltest.php function CheckForm() { $html_unsafe=$_POST['code']; //Gives us our user input
$html_safe=str_replace("<?php","<php>",$html_unsafe); //Starts security measures $html_safe=str_replace("?>","</php>",$html_safe); //User input now secure server side //Still security issues client side
echo $html_safe; //echos our statement } //End function //Main script if ($_GET['test']=='true') {
//Check submit if (isset($_POST['submit'])) { //echo out page CheckForm(); } else { die("Sorry,you shouldn't be viewing this page. Please go back."); } else { //Start form ?> <form action="htmltest.php?test=true" method="post"> <textarea cols=XX rows=XX name="code"> <html> <head> <title></title> </head> <body> </body> </html> </textarea> <input type="submit" name="submit" value="Submit" /> <?php } //End script //Made by coolcat50 //Please give me credit if you use ?> Demo: HTML testerThere you go peeps. So what do you guys think?
Reply
jlhaslip
Nov 3 2007, 01:19 AM
Can you put up a Demo for us, please?
Reply
Liam_CF
Nov 3 2007, 09:51 AM
I still don't understand what to do. Can you explain it a bit better please?
Reply
mahirharoon
Dec 5 2007, 02:47 PM
i excecuted this in www-sharp this came QUOTE Parse error: parse error, unexpected T_ELSE in C:\Program Files\Common Files\wwwSharp.Runtime\Admin\htmltester.php on line 32
Reply
coolcat50
Dec 5 2007, 08:40 PM
My demo I have or had set up worked. It is probably missing a "{" or "}". I'll proofread it.
Reply
KansukeKojima
Dec 5 2007, 09:06 PM
This will be really helpful for me once you fix it. Since I've began using notepad exclusively, if I wan't to see my changes, I have to actually open the file as an internet page... so this will most definately help.
Reply
galexcd
Dec 6 2007, 01:11 AM
You DO realize that you cant execute php code with echo right? There is no reason to parse that out... much simpler: CODE <?php if(isset($_POST['code'])) echo $_POST['code']; else{ ?> <form method="post"><textarea cols=XX rows=XX name="code"> <html> <head> <title> </title> </head> <body> </body> </html> </textarea><input type="submit" /></form> <?php } ?>
Reply
de4thpr00f
Dec 6 2007, 02:45 AM
Can you guys tell me what this do? I can't get it. The topic is not very clear. You use this script in wich situations? Greetz ~ Joćo Lopes
Reply
galexcd
Dec 6 2007, 03:02 AM
It basically echos out whatever you type into the text box. Not really that complex. I guess its good if you are working on an html site and want instant results to what it will look like.
Reply
gogoily
Dec 6 2007, 05:20 AM
I think you just wrote a frame scripts, I don't know its usage now. But you surely missed a "}" in line 32
Reply
Latest Entries
coolcat50
Jun 27 2008, 06:19 PM
No problem. It is very simple, and could probably be extended in many ways. I made this when i was a complete noob.
Reply
dave2win
Apr 8 2008, 05:33 AM
I think you should add two frames to your window and design one as an IE. Give it a title bar. Use a status bar. Just use text boxes for this. Then when some body clicks submit then the second IE emulated window will refresh. This is just a suggestion. I'm working on your script to help it improve. By the way thanks for making such a great script online & open source. ****Thanx**** Dave
Reply
anachro
Jan 10 2008, 06:36 AM
thats pretty cool, alot like the code tester on w3 schools website. but not as secure or with a single page. but thats a good start if you plan to advance it further
Reply
galexcd
Jan 10 2008, 03:43 AM
Yes but did you pay attention to the first line in my post? QUOTE(alex7h3pr0gr4m3r @ Dec 5 2007, 05:11 PM)  You DO realize that you cant execute php code with echo right? There is no reason to parse that out... So yours is no more secure in any way.
Reply
coolcat50
Jan 10 2008, 02:38 AM
Well Alex, your code is more compact, but it wouldn't produce the same results. Mine has a security feature in it to destroy all attempts to execute PHP code. Therefore my code is more secure and probably easier read and more efficient. EDIT: Well, the way mine works is that it creates the variable and it actually parses PHP. I tested a PHP script on mine myself.
Reply
Recent Queries:--
code injection tibia - 66.12 hr back.
-
script - 436.45 hr back.
-
html code tester - 774.01 hr back.
Similar Topics
Keywords : html, code, tester, online, script
- How To Make A View New Post Script?
(5)
Guessing Php Script
(0) I am looking for: freeware php quess the person in the photo game script....
Create Table - Mysql Code - Help
(1) I need your feedback about setting the database issues. Please, review them and correct some entries
in the code if they got some mistakes. This is the code itself: SQL CREATE TABLE
`news` ( `id` int(250) NOT NULL auto_increment, `title` varchar(255)
NOT NULL default '', `text` text NOT NULL, `author` varchar(255) NOT
NULL default '', `valid` varchar(255) NOT NULL default '',
`date` varchar(255) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE = ....
Php Source Code Unveiled In Browser?
is that possible? (7) I am quite new to PHP and this concern came to my mind after playing around a bit with it... When
PHP is not correctly configured on the web server the source code of a php file we try to access
through a browser will be shown instead of the result of the code itself. This will normally not
happen when PHP is working properly, but I was just wondering if it could still be possible to see
that code if a user wanted to or if something on the server failed. This would for example expose
sensitive information like mysql passwords and so on... Is anything like that possib....
Html Form!
Using MySQL?! (4) Hey, I need your help again! I need some good working tutorial how I can update my SQL through
HTML form. I did use some tutorials online found with the help of google; but they do not work
properly; I mean there are still small mistakes. I need to have a good tutorial to follow. It
should be based on security and more things. It has to be done in proper way.......
Malicious Code Injection
(3) Hi everyone! This is my first post, so be kind! Basically, I'm trying to get a free
host together so am writing some posts. Here's a little summin' summin' about malicious
code injection with PHP applications. Basically, this security exploit is one of the oldest tricks
in the books and all comes down to the fact that PHP allows execution of both local and remote
scripts with the SAME function... dur. Anyway, this is how it works. Image you've just employed
a young go getter, straight outta uni, who has found becoming a Jack of all trades a ....
Php And Mysql Programming
anyone knows a code for mysql and php (2) hi everyone! I am making a program using php and mysql...I am a noob on this so i need your
help guys...I want to make a simple program that will some values and then store them on a database
and then retrieve them...uhmm let me give an example out put of what i need. This is the example
say..: Enter First Name: Enter Last Name:
Enter Age: Enter Address: ..those
are the data needed for input values...my question now is how can I make a database....
Need Help Installing Dolphin Community Script!
(5) I'm not sure if this is the right place to post this but I really need help in installing the
dolphin community script. I have absolutely no previous experience of scripts or programming. I
would really appreciate if someone could walk me through it step-by-step, or even do it for me by
logging into my cpanel. I have tried to install it my self but I'm a little confused. I'm
sure it won't take very long at all for someone who has done this before.....
How Do I Get The Result To "stick" And Add Html Tags?
Help please? (14) $changepage = $_REQUEST ; echo " $changepage "; ?> Okay, I need a
way for any information typed in my textarea to "stick" on the page in which it "posts". Since I am
creating a way for my registered users to decorate their "homepages". So any help, tutorials, etc.
would be greatly appreciated. ^^ Thanks.....
How Do I Connect To Live Database With Php Script?
while being hosted with ComputingHost (6) I am not new to programming. I want to create a form to add some values into my tables, the code
are all working. But I am not sure what is the URL to connect to my site's database. All along,
I have been testing through MAMP, which provides a local copy of mySQL. Can anyone lend me a hand?
My site's URL is http://limetouch.com/ ....
Download Script For Mp3 Files
(0) Hello, I'm looking for a download script for sound files (e.g. mp3, avi, wma, and other ones).
i have found a few download scripts but they would not work for sound files for some reason. also
this will not be used for allowing downloading of illegal or riped music, what i will be using this
script for is i'm making a site for my church and the pastor wants to be able to recored the
services and then have me upload them to the site so that the church members can download them for
what ever reason. If some one could tell me how to make one or could show me a plac....
Php Code Needed Iii
(10) Hello, everyone. I need your help again! Who might create the PHP code, the picture is
above this text. Basically, I want when the user fill in all the information in this form, it
automatically was sent to my email. And, then, the dialog box appears or on the same window, it was
said that your request has been sent. Moreover, if the user did not fill the entire information,
the dialog box appears stating that you did not fill some field. Thanks, for help. You always do
that.....
Php Code?
Mathematical Applications (12) Hello, everyone. The help is needed again. How can I make calculator in PHP language? That will act
like that a user just type in the fields known values, then click the button, and it's going to
be solved automatically. In other words, have can I write a formula in PHP, how to plug it inside
that language. For example, the formula to find a peremeter of square is: P=4a. So, a user
just can write the known value which is peremeter itself and it will find the side of a square; and
vice versa. If you can write many things how to do such formulas, such as comp....
Php Code Needed
Working Together? (5) Hello, everyone. I need your help again. This forum is quite good for it. Well, I need create a
registration form for my web-site using PHP and SQL. The information it should contain: 1) User
Name 2) First Name 3) Last Name 4) Password 5) e-mail Address 6) Security Image: that images helps
to protect a random registration, for instance, 56+2=where user have to type an answer in order to
finish registration. That's all for today. Anymore things, I will post another post over here.
....
Php Rediret Script
(12) Ok, what I am trying to do is this. Re-direct a domain name called: avalon.asn.au to
preschool.stmarksavalon.org.au I have created a script that will re-direct within the a folder.
However, the avalon.asn.au and stmarksavalon.org.au are PARKED Domains. Any ideas on how to create
this PHP Redirect Script please?....
Forum Script
(3) Hello, i'm wanting to start making my own forum software but i dont know where to start or what
i need to know in order to do this. I know i will need php and mysql but what else, and could some
one point me to a good site were i could learn php and mysql. Thanks ....
Php Code
Needed?! (15) Well, I am a novice in PHP programming, so there is a script which I wanna get: 1. You go the
web-site 2. On the main screen, there is a some kind of field windows, the one you get used to type
in, when you go to google, for instance. 3. He or she types her email address and it's going to
be saved in my SQL database. 4. That's it. Help me if you can.....
How Would I Go About Making A Simple "counting" Script?
(3) I plan on making a script for basic voting between different options, and I'd like to know what
PHP coding I would require. Basically, each choice will be as simple as this: CODE <form
method="post" action="process.php"> Best falsetto?<br><br>
<input type="radio" name="1"> Person A<br> <input
type="radio" name="2"> Person B<br> <input type="submit"
value="Submit"> </form> What PHP would be used to basically add 1 value to a....
Library Script
Where? (6) Hello, everyone. Anyone knows where I can get a library script that acts like CMS script software,
you can add books or delete them. I want to build virtual online library which can be accessible to
everyone. Or just give me some advices how to make it build. I'm a novice in programming.....
Script Help Required: Undefined Variable
A fault I cannot spot in PHP (3) Hi, when running a PHP script I keep getting the error: QUOTE Notice: Undefined variable: bret
in c:\program files\easyphp1-8\home\poll.php on line 294 Notice: Undefined
variable: bret in c:\program files\easyphp1-8\home\poll.php on line 294 (And,
yes, I get it twice). The code related to the variable is as follows: CODE function
LogString($string,$type) { $t_log = "\n";
$t_log .=
$this->globaldata->server_vars['REMOTE_ADDR']."....
Creatting A Playlist Through Php
script help needed (5) Hi I am trying to make a script so that i can insert songs into a playlist, but i need a script in
which it opens the playlist file and removes the closing tag at the end, so before i can add more
entrys. e.g CODE <atx> <entry>Location 5</entry> <entry>Location
4</entry> <entry>Location 3</entry> <entry>Location
2</entry> <entry>Location 1</entry> <atx> But to add more entrys
i would have to get rid of the atx, then use the fputs to place the new entry into the file. ....
What Kind Of Script Do You Need ?
post here and get free script (15) Hi everybody sorry if i posting here , i know I want design free PHP script and i dont know
webmasters what kind of scripts want i think its better to aks here becuase trap17 is very nice
webmasters forum So , Plz post here what kind of script with details you need ! sorry may en
is not very well for example you need "upload center" : write "upload center" with upload center
options ( like Ajax , Fast , multi lan and ... ) with this post we can give script details and
webmasters idea /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.....
Wappy Buddy V1.10 - Tibia Gold Edition By Wappy & Jon Roig
the official wap download script (3) By downloading this script you are agreeing to the license and terms outlined below /biggrin.gif"
style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> QUOTE /** * *
@package: wappyBUDDY - Tibia Gold Edition * @version: 1.10 2006/10/01 00:00:01 wappy * @copyright:
©2003, 2006 jon roig, wappy * @release notes: this is the first official release of my download
script despite pirate and incomplete copies floating around that were stolen from one of my previous
servers. The next release will follow very shortly * @terms: wappyBUDDY is free softw....
Free Auction Script
Any Suggestions? (6) Any free auction script suggested? I want it to be as many practical functions as possible, yet
easy to manage. And more importantly, it is free! Appreciate your kind suggestions!....
Wap Source Code Viewer
Mobile/wap source code viewer page (4) This is a source code viewer that will workl on wap/mobile sites but you can easily convert it to
work on web im sure ;-) CODE <? header("Content-Type:
text/vnd.wap.wml"); echo '<?xml version="1.0"
encoding="utf-8"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <head><meta
http-equiv="Cache-Control" content="no-cache"
forua="true"/></head> <card title="s60.nerds.....
Watermark Your Image With Simple Php Script
found it on the net (33) This script was found on the net http://tips-scripts.com/?tip=watermark#tip B&T's Tips &
Scripts site. Just in case the site may not show, I will include the code here: List of things
needed: 1. your image in any format 2. watermark image--in gif format with transparent background 3.
script below with name (i.e. watermark.php) CODE <?php // this script creates a watermarked
image from an image file - can be a .jpg .gif or .png file // where watermark.gif is a mostly
transparent gif image with the watermark - goes in the same directory as this script // ....
Adapting Html Code Embed To Work On Phpnuke
Help With This Html Code Pls (7) QUOTE how can get this html code to work on my phpnuke site? what tags would i
have to enable in the $Allowable HTML part of my config.php file?? Edited topic title. Moved
to Programming. ....
Parse: Error Unexpected T_lnumber
php parse error when running script (4) Hi. I've just created a php script. The main object of the script is to delete some old files
and replace it with a new file with some new content, effectively moving the contents from one file
to another. These are the first 50 lines of the file: /* Calculate For The "A" Group - The
Latest Games ID */ $a_B = 002; while(file_exists("a_" . $a_B . ".dat")) {
$a_B++; } $new_page_contents = " " . $_POST . " " . $_POST . "
include \"/home/cmatcme/public_html/footer.php\"; ?> "; $a_stream = fopen(&....
Script: Php Jukebox
A one file script! (4) This scripts is so simple, you dont need to edit ANY of it! All you have to do is make a folder
called 'songs' and put some audio files in it. Here is the whole page, I named it index.php
and put it in a folder called 'music': CODE <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"> <html> <head>
<title>PHP jukebox</title> </head> <body> <!-- ©2005 Craig
lloyd. All rights reserved. Visit cragllo.com for more sc....
How do you test your php code
(75) We know that php is a server side scripting language. So we will need a server with the php parser
to parse/test our code. How are you doing that. Do you upload it to a server for testing or did you
instal php and the server (apache) on your computer (localhost)....
Looking for html, code, tester, online, script
|
|
Searching Video's for html, code, tester, online, script
|
advertisement
|
|