I have a form which shows results if a proper roll number is entered... the results are fetched from http://results.vtu.ac.in and only the table is shown... now i want to add the data of the table to my database using php.

Is there a way to do it..?

for example if the roll number entered is 1rn10cs006

the page will show the results as Semester: 8 Result: FIRST CLASS WITH DISTINCTION

Subject External Internal Total Result
Advanced Computer Architectures (06CS81) 59 23 82 P
System Modeling and Simulation (06CS82) 55 22 77 P
Project Work (06CS85) 97 97 194 P
Information and Network Security (06CS835) 59 20 79 P
Seminar (06CS86) 0 49 49 P
Programming Languages (06CS846) 60 24 84 P

Total Marks: 565

Now i want the data from this table to be stored to my database so that if the same roll number would search again... the result should be shown from my database and not from results.vtu.ac.in...
Help me out pls..

Recommended Answers

All 2 Replies

OK, the way I would do this is:

Pull the page source from that page using cURL, and parse it server side. Simply storing it in an array until the parsing is complete. One completed you would convert the array to JSON (with PHP's json_encode function), then store it in the DB in a column with another column for the roll number. Storing this data in the DB would make it easier to store the results table if the number of subjects vary.

Now it is stored, use the array made earlier to construct a HTML table that would fit into your own website. A few loops would do this easily.

Give it a try, if you get stuck, I'll see if I can find the time to put something together for you.

thanks for replying...can u link me to some site which as same example

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.