PHP-based HTML Validator
anyone know of a good PHP-based HTML validator? something that resembles what they have at W3C, or maybe something that can point out obvious syntax errors and tag typos.
View Complete Forum Thread with Replies
Related Forum Messages:
Web Based HTML Email Client
I have successfully built a web based email client that supports HTML. The question I have for you is why do I get "3D", "=" with a carriage return, "=A0", "=20", "=09" all over the place (without quotes of course), and thats just what I've seen so far. I looked at the source of the email in my email client (I'm using Netscape Mail) and they are there too but my email client does not show them. How does my email client know that they aren't suppose to be shown and what do they do in the first place?
View Replies !
HTML Header Based Extraction
I consider myself pretty proficient in PHP I have written a number of high quality database driven websites in PHP but I am having trouble with what I am trying to do now. I have a variable filled with HTML data that will look something like this. Code: Blah blah blah <h1>Whubba</h1> <h2>ROFL</h2> This is a test <h2>OMG</h2> Yep, it's a test <h1>LOLZ</h1> No! It's not! but there is no particular order, LOLZ could be before Whubba and OMG could be before ROFL. In some cases LOLZ, OMG, or ROFL may not even be there. Only a few things are certain, the level 1 header Whubba will always be there. If ROFL and OMG are present they will always be after Whubba but before any other level 1 headings that follow Whubba and they will always be level 2 headings. So I need to extract the content of ROFL and OMG up until the next heading (it could be another h2 or a h1) and save that information in a variable, one for ROFL and one for OMG. How would I do this?
View Replies !
Send Html Based Mail Like Newsletter
I try mail() function. we can send plain text mail using this function. but if i want to send Html based mail like newslatter then how it is possibal in PHP. Please describe in detial. I have little idea that i have to use mime multipart mail format for this, i don't know who to use this with mail function...
View Replies !
Getting HTML Source Based On User Cookies
I am attempting to get the HTML source of a web page on a different domain, but the source is based on the client's cookies they have stored for that site. I've tried using javascript with iframe's and XMLHttpRequests and HTMLHttpRequests, but it's restricted to inside my domain. With php you can get the HTML source of any web page using the file functions, but since its server-sided i don't think I would be able to open the page and get the HTML source based on the users cookies. Is there someway using PHP I don't know about, or mayb combinding javascript and PHP in some sort of AJAX engine?
View Replies !
Dynamically Creating Html Table Based On Array
I need to create a table based on parameters from a form on the previous page. The form sends up to 15 variables that are read out of the url into an array ($func). These variables refer to functions that a product may or may not have. This page should show which products have the functions chosen. Normally when I create such a table in DW, its always based off the DB directly with SQL, with a filter on the URL parameter. I can't work out how to do the same when there are multiple parameters in the URL, or alternatively, pulling the parameters from the array.
View Replies !
PHP Page That Displays Html Based On The Address Enterd
I would like to have a PHP page that displays html based on the address enterd. For example: index.php?example=a would show a page with <body>Example1234</body> whereas index.php?example=b would show a page with <body>Example5678</body>. I've done this before, but I can't remember the code I used.
View Replies !
Php Based Html Feedback Form Produces Blank Emails
I have a php script to handle feedback on a website that I've built for a colleague. The site was based on a template that uses a flash header and 'iframes'. Unfortunately, when the visitor submits the form data, the email that is sent off does not collect any information from the form. I'll admit I'm quite new to php so this is foxing me. Extracts from the Contact page on the site are provided below plus the php file. Code:
View Replies !
Browser Based Ftp Login - HTML Page Where Users Type In A Username And Password
First let me say that I don't really know PHP at all. What I want to do is have an HTML page where users type in a username and password. After they click submit they are redirected to "ftp://username:password@domain.com" where they can download and upload files to their folder. Each username will have a folder in the directory that has the same name as the username. `So if "Mark" logs in, I want him to see the contents of the "Mark" folder where he can upload and download files. I don't want him to have access to anything else. As I know nothing, I did a lot of reading up and researching on how to do this (lots of great information on this site by the way) but the PHP code might still be way off. Here is the code I have so far: for the html login page: <html> <body> <form name="form" method="post" action="ftp.php"> Username: <input name="username" type="text" size="30"> Password: <input name="password" type="password" size="30"> <input type="Submit" size="8" value="Submit"></p> </form> </body> </html> the code for the ftp.php page is : <?php $ftp_server = 'domain.com' //domain being the future website domain $ftp_username =$_POST['username']; $ftp_password =$_POST['password']; $location = 'ftp://$ftp_username:$ftp_password@$ftp_server' header('Location: $location'); $ftp_connect_id = ftp_connect($ftp_server); $ftp_login = ftp_login($ftp_connect_id, $ftp_username, $ftp_password); if (! $ftp_connect_id || ! $ftp_login) { echo "Unable to connect to ".$ftp_server; exit; } else { echo "Connected to host "<p>"; } ftp_close($ftp_connect_id); ?> right now, when i check it, I log on the html page and go the the php page where all it says is "Connected to host." I don't see the "ftp://username:password@domain.com" that I want to see.
View Replies !
Xml Validator?
i'm creating a google sitemap for my site: http://www.google.com/webmasters/sit...emapValidation The sitemaps are in XML format and I think i have created them successfully, but i have been unable to find an XML validator that i can get running ot check my XML against their schema. I know W3C.org has pages to validate HTML...is there anything like that on the web? Or perhaps an XML validator app that runs on windows or a PHP xml validator?
View Replies !
Form Validator
i want to make a couple of my fields required but i'm not sure how to go about it also i want to make the next step go to a url not echo just some words.
View Replies !
Security Validator
I am currently new to PHP and have just started a project to create a PHP security validator.... 1. What does a validator actually do in simple terms, 2. What security issues arise with php programming, 3. Any useful links that may help me with this project.
View Replies !
E-mail Validator
Code: function is_email($email){ $rBool=false; if(preg_match("/[w.-]+@w+[w.-]*?.w{1,4}/", $email)){ $rBool=true; } return $rBool;
View Replies !
Image Validator
I am having problems with dynamically displaying image on my form for human interface validation. The form page <?php // Velox Letum (2005) // elementation@gmail.com // Require the class code... require ('gd_image_verify.php'); // Initialize class $gd = new gd_verification(); if (isset($_POST['submit'])) { if ($gd->verify_string($_POST['gd_string'])) { $result = 'User input matches image string.' } else ...
View Replies !
Problem With This Age Validator - Workarounds?
I am trying to find a workaround for the Unix date issue to calculate ages based on a persons birthdate and the current date. Here is the code I am working with now, <?php $dob = "10 July 1981"; $dob = strtotime($dob); $today1 = strtotime ('now'); $today=date("d.m.Y",$today1); $f_date1 = $person_dob; $f_date=date("d.m.Y",$f_date1); $difference = intval(((($f_date1 - $today1)/86400+1)*-1)/365); print $difference; ?> This obvisouly will work, until I start inputting birthdates pre-1970. Is there something better (that is accurate) which will calculate & accept the long birthdate format I am using here?
View Replies !
Apache2, PHP, And The W3C Xhtml Validator
Sorry if this is the wrong NG to post this in. I have installed Apache2 and PHP on my Mdk 9.2 box. I have made an info.php page to test if php is working. It appears that it is as my info.php is displayed as it should be. The only thing is, when I upload the info.php file to the W3C validator, it complains: **Sorry, I am unable to validate this document because its content type is application/octet-stream, which is not currently supported by this service.** My understanding in this instance, that the page should be processed and delivered to the validator. This isnt happening. Does anyone have an idea why it is failing in this manner? At this stage, I am confused as to whether its a setting in PHP or Apache that needs adjusting. As info.php works through my web-browser, I dont understand why the page isnt being validated.
View Replies !
Form Data Validator
Can any one recommend a class for form data validation? Seems something all of us need to do. I am constructing a large on line app and my validation needs are going to be quite wide in range.
View Replies !
Apache AddType And W3C Validator
I hade some PHP pages, and the markup validated alright. In order however to make them SE friendly, I was advised by an "expert" to give them the *.htm extension, and to add AddType application/x-httpd-php .htm .html to our .htaccess file. But from then on, the W3C validator returns me a server error 500. Any workaround for this, or should I live with the fact that validation of markup can not be checked any more?
View Replies !
Adding PHPSESSID Only In Validator.w3.org
I was trying to validate my page (www.thestitches.co.nz/prints.php), but when I entered it into validator.w3.org, I got a lot of errors from PHPSESSIDs that had been added to all links. I did not do anything with PHPSESSIDs and furthermore, when I looked at my source in Firefox, the PHPSESSID was not visible. What the hell is going on?
View Replies !
Adding Email Validator
I've tested the php ans it works but it doesn't check the email field for validation. So if you fill in "sdssdf.com", it is ok for the php file and sends the message.
View Replies !
Generic Form Validator
I've been doing a good bit with php lately and every site I work on wants their forms validated. Is there any possible way to write a generic form validator even for forms that are completely different? I know this sounds like a weird request but being programmers, aren't we supposed to re-use code. I'm sure you lot do this all the time but can you let me know how you re-use code in this instance?
View Replies !
Anti-bot Form Validator
the code snippet for that "copy the four characters you see in the box" anti span validation thingy. I hope you know what I mean, That litle box with difficult-to-read characters in it that you have to key to prove that you are not a bot.
View Replies !
** SOLUTION: Apache2, PHP, And The W3C Xhtml Validator **
Firstly, thank you to everyone that replied to my OP. I am new to the PHP world and so its great that there are people out there who are prepared to share their knowledge. Anyway, I am developing a website on my home pc. I dont have server-space outside my home. So, I needed to be able to validate my code by file upload to the W3C's html validator at This solution is so easy, I am surprised that my extensive googling didnt provide an answer as it does return MANY hits relating to this search. I thought I would post this so that there is something **out there** for others that come across this problem. My original problem was ...
View Replies !
Generic Php Form Validator Class
I need a generic php Form Validator class that do: 1- display the form 2- validate the form 3- if the form is invalid, display the form filled with the valid data and flag the invalid fields 4- loop until all.
View Replies !
XHTML Validator Not Liking OnMouseOver Event
I am trying to validate my website against XHTML 1.0 transitional. Unfortunetely it throws up an error because I have used javascript event onMouseOver <span onMouseOver="Swap_Image(... .... and it gives me an error saying that there is no onMouseOver attribute. Is there any other way of writing this?
View Replies !
Cookie Based Script To Session Based
PMsys is a script that based on Cookies rather sessions(what are people thinking in 2003?) To intergrate this system to mine website, I got to change all the cookies to sessions. So, I think 1st replace all the: $_COOKIE into $_SESSION and then write a function that search and find a line that contains: setcookie('a', 'b', $whateverthetime); into session_start() $_SESSION['a'] = 'b' will that work? is there anymore things I have to think about? anyone can write a function to do that? I just can't get a hold on regular expressions.
View Replies !
HTML Email Using PHP Problem (Receive Html Tags)
When I send the html email, the only thing I receive is the tags (the html codes basically). I want to be able to see the email like a html page, what is wrong with my code? Here is a copy paste of it. $HTML = "</html><body><img src='http://www.somewebsite.com/ someimage.jpg'></body></html>"; $headers = "From: $from "; $headers .= "MIME-Version: 1.0 "; $boundary = uniqid("HTMLDEMO"); // Now we attach the HTML version $headers .= "--$boundary ". "Content-Type: text/html; charset=ISO-8859-1 ". "Content-Transfer-Encoding: base64 "; $headers .= chunk_split(base64_encode($HTML)); mail($to,$subject,"",$headers); print "mail Sent<br>"; The email I receive has this as text: </html><body><img src='http://www.somewebsite.com/someimage.jpg'></ body></html>
View Replies !
RemoveHandler .html .htm (parse Php In .html Files)
I want to parse php in .html files. I put this in .htacces file: RemoveHandler .html .htm AddType application/x-httpd-php .php .htm .html Its work, but some of my php aplications have urls: www.mysite.com/this-is-page without .html in the end how to parse that? Which code I must use.
View Replies !
Embed Php Generated Html In Another Html Page
I am trying to include some php generated html in a page that is just a standard html file, NOT a php file. I have seen other html pages do this by including an src to the cgi script in script tags, like this: <script src="http://someurl.com/somescript.cgi"></script> the html page loads and the script is executed and the returned html is displayed in the calling page. So, I tried this: <script src="http://someurl.com/somescript.php"></script> It doesnt work!!
View Replies !
.html' Page Be Replaced By '.html.php'
Can a '.html' page be replaced by '.html.php' page via RewriteRule? To clarify, I'm using a software that formats the look of the site using .html pages. I'd like to add PHP code to that page but of course, it is not of the right page type. What I was wondering is Could I create a duplicate of that '.html' page, rename it to .g. '.html.php' and make the revisions and then just create a RewriteRule that redirects the '.html' page to the '.html.php' without generating an error? The alternative and undesired way of doing it would be to rename the original page to '.html.php' and find and revise ALL of the routines that call that page. That would create a revision nightmare especially upon upgrading the software.
View Replies !
Web-based PHP IDE
due to being a traveller with a constant problem of getting connected to my server and update or recode chunks of my site. Web based IDE for php with login stuff so only i can edit my site... I can of course create one of my own (read above - me = php developer) but it takes time and effort... so i want to see first, if there's something already made out there...
View Replies !
Web Based IDE?
I have been doing quite some php using UltraEdit and Eclipse. Now i recently done another Smalltalk project i realize how i miss the searching capabilities of a good IDE: definitions of- and references to functions by name (called senders and implementors in Smalltalk), preferably combined with wildcards and 'search for function name where the cursor is in'. These are all available for Java in Eclipse, but not for PHP. Now i already have built all these seaching capabilities in the form of our Hypercode Browsers, but once i have found what i searched for i would like to press an 'Edit' button to jump to a descent code editor. I could easily add a standard TextArea in the browser to get a simple Web Based IDE, but i would rather have a good color coding editor. I could adapt one of those fancy rich text editor components we use for our CMS, but that would require a color coding algorithm, preferably in JavaScript, and probably more JavaScript knowledge then i like to learn. So this is my question: anybody ever heard of a dynamic html component for web based code editing, that supports color coding? Or maybe a complete web based IDE? Or maybe a way to make UltraEdit or Eclipse open a specific file from JavaScript (or remotely from php)?
View Replies !
XML-Based CMS
I've created the forms etc, I just need a way to save dates+events to an XML file. eg. <event> <date>01.01.06</date> <description>Blah</description> </event> Now, there'll be many events; and as well as adding an event to the XML file I'll need a way of displaying the information from the XML file onto a page, in date order.
View Replies !
XML-based Configuration
Does anyone know a good way to retrieve data from inside of an XML file and use it for configuration within my PHP apps? I tried PHPXConfig, and even with caching a serialzed version of the object, using the getData() method (you give it an XPath) makes my application a lot slower.
View Replies !
PHP And Web Based Mail
PHP can create application about web based mail.. like yahoo ,hotmail or not..?? Almost articles explain only view, read, reply, attached file function.. I would like to know how can php connect to mail server for creating new account for any user real time, does it can do..?
View Replies !
Php Based Crawler
The problem is, im trying to make a central portal so that all of ma frieds blogs recent post can be seen on it. so that its easy to see who posted wot and all... the process needs to be that when i add a URL, the crawler then keeps cheking on the URL's. if theres a new post made it has to appear on ma central portal with the title and descriotion.. so is there a way to do this or any script out there that is currently doing this..
View Replies !
Web Based Email
I really need a web based email script. Something like hotmail is what I'm aiming for. Users have to be able to sign up on the web, and login to their account, exactly like with hotmail.
View Replies !
Web Based Mail
I want to make my discussion forum page become more powerfull.Let's say, if someone send an email,then the subject become the new topic's subject. and it will record the sender's name and the massage too.
View Replies !
Accessed Based Off Of IP...
There are certain scripts that I have that only I want to run, both from home and sometimes work. If I add something like this (below) to the scripts, will this keep out unauthorized use (if the scripts are found somehow), or can the REMOTE_ADDR be easily spoofed ? Should I be checking HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR also ? $ip = $_SERVER["REMOTE_ADDR"]; if (($ip == "x.x.x.x") or ($ip == "y.y.y.y")) { //secret stuff } else { echo "<META HTTP-EQUIV="refresh" content="0; url=/index.php">"; die(); } or something like this: function getipaddress() { $ip; if (getenv("HTTP_CLIENT_IP")) $ip = getenv("HTTP_CLIENT_IP"); else if (getenv("HTTP_X_FORWARDED_FOR")) $ip = getenv("HTTP_X_FORWARDED_FOR"); else if (getenv("REMOTE_ADDR")) $ip = getenv("REMOTE_ADDR"); else $ip = "UNKNOWN"; return $ip; } $ip = getipaddress(); if(($ip == "x.x.x.x") or ($ip == "y.y.y.y")) { //secret stuff } else { echo "<META HTTP-EQUIV="refresh" content="0; url=/index.php">"; die(); }
View Replies !
DB Based FORM
I have the following code: [PHP] <form method="POST" action="moviescoreinput.php"> <select name="usermoviescore"> <option value="0" selected="selected">0</option> <option value="1">1 - Terrible</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5 - Average</option>... And as it is, the dropdown menu defaults to 0. I want the user to be able to come back and have their score displayed as the selected in the dropdown menu, is there any way of doing this without having 10 ifs and echoing a different set with the returned score as 'selected' everytime?
View Replies !
Rand Based On
I was just wondering what the php rand function is based on? how does it come up with these random numbers?
View Replies !
PHP Based Geolocation
I'm currently looking using a IP database to do city/state lookups... The vendor of the database claims the following accuracy: "The database has over 95% of accuracy in country and ISP level, 70% in region level and 65% in city level" I understand this won't work for AOL or MSN users, but I thought maybe someone knew of a script which would give me a rough idea of where the person was located?
View Replies !
Any Suggestions For Web Based Ftp?
I'm looking for a free web-based ftp-solution. All I can find is "Virtual FTP Apps", I don't want a full-feathered ftp client. What I need is: An admin tool where I can create accounts Static ftp-server-address (not modifiable by user) Ability for users to see and download contents of "their" folders on the ftp server via a regular web-browser- Keep in mind, I don't know the first thing about scripting, I only know html, but I'm sure I can figure out basic stuff.
View Replies !
A Web Based Cleint
I am a PHP developper. I was thinking of writing a blogging software that would use public blogging services like www.blogger.com to store the data. But before starting on to do so I would like to know if someone has done stuff like this already. Any suggestions about current blogging systems, that can be modified easily do adapt to this concept.
View Replies !
PHP Web Based Mailing
I could set up a simple Form that collects user data and that have that e-mailed to a designated account. So he basically coded it for me, and it kinda works, but not completely.Would it be inappropriate for me to post the code here to get help with what's wrong? It's not really long, but I desperately need to get it working. I assume that a PHP pro would be able to look at it and know right away what was wrong. Unfortunately, I haven't been able to get in touch with the friend that set it up for me. I'll wait for a response before posting my code.
View Replies !
String Name Based
I want to echo a string based on the value of another string. ie $advts could equal a number of different things including p4u, lnk and cys. I then have a number of different strings such as $p4u, $lnk and $cys. I want to print the value of any one of these strings based on the value of $advts. I thought something like this would do the trick: echo "$$advts"; but this results in giving me the name of a string rather than the value. Omg, that makes little sence at all, so, example, $p4u = "hello world"; $advts = "p4u"; echo "$$advts"; should result in "hello world" being printed, insted i get "$p4u" being printed as php sees that first $ as being a piece of text and not the start of a string name. Do i have to place something around the $advts part,to get this to work,can it even be done?
View Replies !
|