Jump to content

[SOLVED] grab data from page?


newb

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 )

 

 

Link to comment
Share on other sites

"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 ;-)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 7 months later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.