Fetch Data from another website

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
edinburgh_accom
Forum Newbie
Posts: 1
Joined: Mon Nov 16, 2009 2:45 pm

Fetch Data from another website

Post by edinburgh_accom »

There is a school locator script at https://www.ocps.net/parents/pages/FindaSchool.aspx
When we input any address it returns schools located in that locality.

For example:

Use these details and submit the form

Street Number : 3902
Street Name : Bobolink
Street Type : Lane
City : Orlando


It returns a row having three schools Elementary,Middle and High school
On clicking the more button it takes to the respective school details
So for each school I need the respective school names

Audobon Elementary
Glenridge Middle
Winter Park High

Please suggest some ways to achieve this functionality


Thanks




http://travelinfo.techserveglobal.com/
http://blog.techserveglobal.com/
buckit
Forum Contributor
Posts: 169
Joined: Fri Jan 01, 2010 10:21 am

Re: Fetch Data from another website

Post by buckit »

Its almost like they wrote that site specifically to prevent such behavior :)

I do something similar on the ATF site using CURL. but its a very very basic form that returns obvious results.

you have a couple problems from what I can see (am no CURL expert by any stretch). The primary form is actually quite large and uses a lot of javascript for who knows what reason. But lets say you can get past that and curl the page those those post variables....

your next problem is the results page requires you to submit yet another form (the more buttons). now, those form buttons send you to https://www.ocps.net/Students/Pages/Sch ... umber=1411

in theory that would be simple... CURL the first form, then parse the resulting page for the schoolnumber and then CURL https://www.ocps.net/Students/Pages/SchoolInfo.aspx with the schoolnumber querystring. Problem is I dont see anywhere in the source that has the schoolnumber... and again, its using a LOT of javascript.

This is obviously way beyond me and I am of no help at all... but I figured I would go ahead and post what I have figured out so far so maybe someone else can help.
infomamun
Forum Contributor
Posts: 102
Joined: Mon Dec 28, 2009 7:48 pm

Re: Fetch Data from another website

Post by infomamun »

buckit can you tell me why CURLOPT_RANGE is unable to load partial data, instead it returns the whole page, makes this option unusable.
buckit
Forum Contributor
Posts: 169
Joined: Fri Jan 01, 2010 10:21 am

Re: Fetch Data from another website

Post by buckit »

I wish I could help further... but my knowledge of CURL is only in the one small project I did.
Post Reply