My knowledge of php is not good and I need help.
I have this php form but I don't know how to add a CAPTCHA mechanism.
How do I achieve this?
I really like Securimage is seems to work really well and does not require a third-party external service or javascript (unless you enable the new image feature). Also it can be configured to provide audio captcha for accessibility.
Check this detailed guide about captcha implementation in PHP: http://www.the-art-of-web.com/php/captcha/
Related
I am trying to use Google Analytics with php. I can't use javascript. Is there is any way around this?
I've tried some of php libraries but its seems these libs are not working.
Lib which i tried: http://code.google.com/p/serversidegoogleanalytics/
Thanks in Advance.
Yes, google provides a server side code here:
https://developers.google.com/analytics/devguides/collection/other/mobileWebsites
Which provides a basic functionality and works perfectly for page views. However, it does not include events or custom variables. What you can do is use this code along with some simple functions that will allow you to sent the right parameters (utme) into the gif request.
I am trying to get to grips with various forms of web design and build. I have looked around and still cannot get a useful answer on what technology is best to create a Dynamic Submission form (that doesn't look like crap).
I want to build a sumitable form that is aesthetically pleasing. I have planned and sorted out that I will use PHP and AJAX so it can be interactive but I am lost on what technology to use to actually code/script the design of the form. If anyone can help it would be greatly appreciated, thanks in advance!
If anyone who reads this uses Virgin Media as their internet provider and they use their card details form online, that is my ultimate goal to make the form similar too (with different questions and submission details, but that isn't important). The look is what I am after.
you are on the right track actually.
for aesthetics, you should research more about designing in HTML/CSS
JS is used for the dynamic user interface
PHP and AJAX are all that's needed for a dynamic form submission
google is your friend. go ask him.
other than that, it's up to your imagination and originality how you implement it.
you would need to use html and css to actually build the form.
Javascript to possibly validate the form on the persons browser (client side)
php would submit and send the form.
If you like the look of the virgin media form you can find out how it was done by using developer tools on chrome (f12 on a windows machine, cmd, alt and I on a mac) or firebug pluign on firefox. Others are available but these are two of the best. This wll show you the html mark up the css and how it all works.
Here you have some examples of interactive forms: http://www.catswhocode.com/blog/10-jquery-tutorials-for-working-with-html-forms
Your best bet will be with ASP.NET.
Its easy to set up and the software is easy to use and is free.
You should use Microsoft web developer express.
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-web-developer-express
You will have the choice to code in c# or visual basic , c# will be the beter choice.
ASP.net is the new generation of website development.
Have a look a http://mirror.me/fzmvdr8e
I believe this is java code on the serverside. Are there any similar solutions using php and/or jquery? Thanks
The page http://mirror.me/fzmvdr8e is made with HTML5, CSS3, PHP, and JavaScript only. View the source code to check it out for yourself. Follow what they have set up there, and try some of the features of the page out yourself. Good luck!
I currently ran into the issue that I do not have the money to buy/rent any professional captchaing service.
So I tried to look around for OS captcha generators, and captcha designs.
I also had a brief brainstorm about my own and simple captcha design.
Do you have any preferences, or can give me a good advice handling captchas in PHP without having huge perfomance leeks?
(My attempt to design a simple captcha: .pdf)
EDIT: Thanks to all of you, I am sorry for only giving one "right-answer", but +1 for every good answer ;)
I actually would suggest that rather than rolling your own you use reCAPTCHA as it is free and of very good quality (used by this site, Facebook, Craigslist etc).
It also meets your requirements in that it isn't resource intensive, as all the image generation and distortion is done on the reCAPTCHA server.
PHP examples can be found here
If you want to design your own captcha, I highly recommend you take a look at this tutorial. It goes through a basic captcha design, allowing you to alter the design of the captcha as you wish, using various PHP image modification functions.
You could alter the code to use random fonts, make each character a different size, skew the image, etc. The tutorial is to show you how a code is created, how it's used with a session, and how to actually use the image in an input form.
Leaving aside the problem of CAPTCHAs being a horrible barrier for users… ReCaptcha should solve the budgetary issues without making you reinvent the wheel.
First and foremost thing you must consider is that you captcha is not easily breakable. There are some good old captchas already breaked/decoded using javascript. For further info please visit these pages:
http://ejohn.org/blog/ocr-and-neural-nets-in-javascript/
http://blog.makezine.com/archive/2009/01/javascript_captcha_decoder.html
To generate it , like Captcha Creator is a powerful and complete PHP Captcha Script that generates Captcha Images.
The classic approach is to generate some random text, apply some random effects to it and convert it into an image.
I'm new at web development, so to make sure I'm writing good code I've been using w3.org validation tools. I'm currently working on a project where I generate a lot of my html with php functions, and I'd like to validate the html, but w3.org doesn't support that. The only way I've found to do it is to render my code, view source and validate that, but that's an awkward, time consuming process, that only approximates validation as it renders differently in different situations. Any suggestions?
Thanks,
Rebecca
Tidy Project:
http://tidy.sourceforge.net/
http://www.w3.org/People/Raggett/tidy/
Good luck.
Edit -
To be clear, with Tidy you can be reasonably certain that the output of your script is valid against a given standard.
You can use Html Validator add-on for FireFox.
The various developer tools in the major browsers will help you validate the HTML your script emits.
IE6/7 - you can install the IE Developer's Toolbar
IE8 has the toolbar built in
FireFox - you can get the Web Developer Toolbar as an addin
I think Opera has some tools built in as well, but quite frankly I only use Opera for testing after I've built using Fx and IE.
The validator tools will not care about php, so if your php is 'bad', it won't care.
It only checks html for concision and proper nesting to the doctype.
Try this, Web Developer 1.1.8 toolbar.
This ad-don works superbly, you can validate locally, for example:
Validate Local CSS
Validate Local HTLM
if you don't have access to some external web-server or even if you do have access to it.
In addition the installation is easy and to validate a given page all you have to do is right click on Tools and there is a whole array of validation options.
https://addons.mozilla.org/en-US/firefox/addon/60
Alternative approach: Hitchhike direct-input at the W3C validator:
( I am also facing the problem, that my staging server would need to be online,
to allow for an easy validate-here link... )
The direct input at the w3c validator submits a form.
Or in other words: The actual validation-page receives a POST request.
So how about: Make a link (i.e. in your footer) that leads to a submitForValidation.php
In that php file:
grab the Referer-URL you just came from (through your localhost server)
submit as POST to the W3C page
Not done it yet, but will probably implement that soon.
Step 1: Run the PHP to generate some HTML, with a command like this:
php index.php > index.html
Make sure that php is in your system PATH variable.
Step 2: Validate this index.html with normal html validation tools.
Opera 12 is good for validating generated pages, you just go to the page, then right click and validate. that's all, so easy that scares lol.