This may sound really stupid but I have to ask cause I’m not finding this answer anywhere.
I have an application where the user will need to sign up for a new user account on the website “wxw.reddit.c0m/register”.
However when I am using Firefox’s plug-in Firebug to view html I am getting something totally different than when I just right click on the site and view the page source.
What I am trying to do is to get the captcha from the website and display it in a picturebox on the application so the user can view the captcha, solve the captcha and then the app post is back to the service for a response.
Here is the source that I am getting using Firefox’s Firebug to inspect the element:
<td>
<input type="hidden" value="Oo3Jo1I8bgzK68agMqo3s79ZZib2OkbK" name="iden">
<img class="capimage" src="/captcha/Oo3Jo1I8bgzK68agMqo3s79ZZib2OkbK.png" alt="i wonder if these things even work">
</td>
Here is the actual page source from right clicking on the page.
<td>
<input name="iden" value="TwRNQVs8sFuU2B2IuESDFUdrnuVyuFc8" type="hidden"/><img class="capimage" alt="i wonder if these things even work" src="http://www.redditstatic.com/kill.png" />
</td>
Why would the two be showing me two different versions of the HTML?
And how would you be able to grab that source to view in a picturebox using webclient?
Captchas are dynamically generated with JavaScript. Since you can’t easily execute the JavaScript by just downloading it (you generally require a web browser), that’s a little more safety for the captcha.
Judging by the fact that you’re using a
WebClient, I’d say you’re trying to register automatically. This might be for “legitimate” purposes but it can also be used for the wrong reasons. What you need to do in this case is open up the webpage usingProcess.Startand let your user register themselves.