At the end of the third part, I'll give you a link which you can use to download all the files associated with this web application project. Passing form variables to PHP via AJAX The script uses captcha code that will pass the answer for the challenge using a PHP session, so at the top of the web form (file name: countuniquelinks.php), this code is placed: <?php session_start(); ?> Discussion of captcha generation is out of the scope of this article. However, you can read another article on this site for a detailed discussion of how to build a captcha system. Shown below this HTML web form screen shot is the source code required to produce the form.
<h3>This tool will count the number of back links coming from unique domains.</h3> Please fill in required data and click "Submit" button.<br /> <br /><br /> <form action="/countuniquelinks/yahooapiajax.php" method="post" onsubmit="return false;"> Enter root domain URL ( for example: <a href="http://www.php-developer.org"><b>http://www.php-developer.org</b></a>). URL <b>should</b> start <i>http://</i> and <b>DO NOT include trailing slash at the end.</b><br /> <br /> <input style="background-color: #FFFFC0" type="text" name="domainurl" id="domainurl" size="50"> <br /><br /> Select whether to get unique backlinks to the entire domain or only to the homepage URL<br /> <input type="radio" name="options" id="options1" value="1" > Entire Site <br /> <input type="radio" name="options" id="options2" value="2" > Only to the homepage URL <br /><br /> <img src="/countuniquelinks/captcha.php" /> <br /> Enter the Captcha as shown above: <br /> <br /> <input style="background-color: #FFFFC0" type="text" name="captcha" id="captcha" size="10"> <br /> <br /> <input type="submit" value="Submit" onClick="sendRequest()"> </form> <br /> <a href="/countuniquelinks/countuniquelinks.php"><b>RESET FORM</b></a> <br /><br /> RESULTS WILL BE SHOWN BELOW after pressing the submit button: <br /> <br /> </font>
blog comments powered by Disqus |
|
|
|
|
|
|
|