newb Posted July 31, 2009 Share Posted July 31, 2009 i need a script similar to this: http://www.thatswhatshewatched.com/cap.php?d=YOJMJ95N trying to get MU's captcha and use it on my own website. anyone know how this is done or the level of difficulty this takes in php? EDIT: looks like it somehow grabs captchacode, megavar input fields and the captcha image frm the megaupload page. didnt know this was possible in php? Quote Link to comment Share on other sites More sharing options...
Errant_Shadow Posted July 31, 2009 Share Posted July 31, 2009 if all you need is a captcha, why not sign up at http://recaptcha.net/ ? It's free, reliable, and each captcha solution is put to good use beyond access to your site. Quote Link to comment Share on other sites More sharing options...
newb Posted July 31, 2009 Author Share Posted July 31, 2009 if all you need is a captcha, why not sign up at http://recaptcha.net/ ? It's free, reliable, and each captcha solution is put to good use beyond access to your site. i dont need any random captcha, i need the captcha that belongs to the MU download cause im trying to download from the MU website from my own. have a look at the script to see how it works by grabbing the source straight from the MU id. Quote Link to comment Share on other sites More sharing options...
Wowbagger Posted July 31, 2009 Share Posted July 31, 2009 This is a fortuitously-timed post, as I have a very similar problem. I'm very new to php. I'm trying use a script to grab a class schedule (from here) and insert it onto a different webpage, formatted as a table if possible or as an image if necessary. I'm new enough to php that I have no idea where to even start looking for answers. I've seen another script do something very similar to what I want (the Dinosaur Comics Second Panel Randomizer, found here), but I can't read that script's source code, so it has not been helpful to me. I'd appreciate any help the forumgoers can shed for me. As a longtime lurker, this place has been helpful to me more than once in the past. Quote Link to comment Share on other sites More sharing options...
Errant_Shadow Posted July 31, 2009 Share Posted July 31, 2009 if all you need is a captcha, why not sign up at http://recaptcha.net/ ? It's free, reliable, and each captcha solution is put to good use beyond access to your site. i dont need any random captcha, i need the captcha that belongs to the MU download cause im trying to download from the MU website from my own. have a look at the script to see how it works by grabbing the source straight from the MU id. Unfortunately the whole point of a captcha is to prevent you from doing just that. You'd have to have access to their server to request the specific code that was generated for that specific captcha instance. Since this information is hidden from HTML, there'd be no way to pull it from the page like you're thinking. On the other hand, wowbagger, what you're trying to do is very possible. Basically, you're gonna grab that page's html and have php search through it for a specific string. the best place to start (I think) would be where the page says "Current and Upcoming Course Offerings" I'm not 100% certain but I think it works like this... you tell php to grab a foreign page and it takes all that html and gives it to you as one big string. Then you break that string at certain points to extract just the data you need; this is known as parcing. So you'll be looking for "<H1 _extended="true">Current and Upcoming Course Offerings </H1>", that's where the tables start. Then you'll probably break it again at "<H2 _extended="true"> <EM >All courses are offered on the St. Paul campus.</EM></H2>" (which is after the tables have ended. Everything in the middle you can then load directly into your page and it should look pretty much exactly as it does on the page you're pulling it from (minus any custom CSS they use that you don't have). Something you should read up on is PHP's explode() function ( http://us3.php.net/explode ) Quote Link to comment Share on other sites More sharing options...
Mardoxx Posted July 31, 2009 Share Posted July 31, 2009 "Unfortunately the whole point of a captcha is to prevent you from doing just that. You'd have to have access to their server to request the specific code that was generated for that specific captcha instance. Since this information is hidden from HTML, there'd be no way to pull it from the page like you're thinking." not entirely true... - although not sure if you can do it in PHP using perl and LWP it is possible.. Request webpage, get hash of captcha key, process image, A HUMAN enters the responce to the captcha, script continues and submits all info including solved captcha. //EDIT OH we're not talking about cracking captchas... we're talking about getting the source code for their captcha? well go to your local private 0day hacks site and exploit their site then download their source code. Once you're in their servers... try and download as much illegal software as you can aswell ;-) Quote Link to comment Share on other sites More sharing options...
newb Posted July 31, 2009 Author Share Posted July 31, 2009 Unfortunately the whole point of a captcha is to prevent you from doing just that. You'd have to have access to their server to request the specific code that was generated for that specific captcha instance. Since this information is hidden from HTML, there'd be no way to pull it from the page like you're thinking. if its not possible, then how is this site http://www.thatswhatshewatched.com/cap.php?d=YOJMJ95N pulling the captcha from http://www.megaupload.com/?d=YOJMJ95N ? clearly its not cracking the captcha, but just transferring what's outputted from one page to the other. looks like php is capable of doing it to me, so my question is how? thats all im trying to figure out. Quote Link to comment Share on other sites More sharing options...
newb Posted August 1, 2009 Author Share Posted August 1, 2009 nvmd, figured it out. its done with some curl functions, if anyone is interested in the script let me know, thanks. Quote Link to comment Share on other sites More sharing options...
Wowbagger Posted August 6, 2009 Share Posted August 6, 2009 Here's a belated final post: Thanks a lot, Errant! Quote Link to comment Share on other sites More sharing options...
nharry Posted March 25, 2010 Share Posted March 25, 2010 Hey newb, I am interested in seeing that code. Attempting to do the same myself. Any help would be much appreciated and rewarded with warm freshly baked cookies and milk. mmmmmm.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.