ok here's the thing, I have a table in my DB (courses), and I want to fill it with data about all the courses that my school has. there's another site which has a form that let's people enter the code of the course and when they click "search" it shows results (that I want to insert into my table).
is there a way to make my code do a bunch of searchs through that site and get the results?

Recommended Answers

All 6 Replies

If you want to use php for this, it would be a lot easier if the school has an api you can tap into. Did you ask about this?

I'm trying to get them to let me connect to their db in some way but meanwhile I'm just planing my 'plan b' in case they won't let me

Member Avatar for diafol

If they don't, be careful of using their data. It may not be allowed to be copied. They own the data, you may still need their permission to use it. I doubt that they'd give you this permission though.

One way to do this would be to use cURL.
Spoof a form on your site - the data gets passed to their site (in cURL) and gets the page result (html). You can then parse the returned data and extract the info you need.

It's inelegant and probably a really wrong thing to do.

hmm I don't know what cURL is, and I'll check, but making a form on my site would mean that someone has to fill it..which isn't what I'm looking for..I need something automated and behind the scenes..like get everything with 1 click or something..

what I'm doing is actually trying to make a web application for the school so the teachers can use it..the data I need is public and anyone can see it..it's just that the people who are supposed to give me the access might stand in my way out of stupid reasons like laziness..so I'm wondering if I can do this without their help, since the data I need is already used by other site anyways

making a form does NOT mean someONE has to fill it
thats what computers do, automate
its just a post request populated from a list
you just sit back and wait while the data flows in

cURL is an addon for php, mostly included on commercial hosts, and it's a free download if you're hosting yourself. Documentation for cURL is included in the PHP manual (which you should get a copy of, or just bookmark the online version), but it's not that easy to understand. Otoh there are lots of tutorials on the net.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.