Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ how to program html website to read 30 million

Posted by: Treewebe Nov 28 2017, 09:04 PM

Hi,

I would like to create a website like this one
https://cellphonetrackers.org/gsm/gsm-tracker.php

I have a file which contains about 30 million cells in a table
When I enter value of : MCC, MNC, LAC, CID
it gives me some result which is the 5th column of that table

I would like to know how I could read those cells in a website from a file or any other way and then get the response quickly when I enter values like mcc, mnc, etc..?
Which programming language or notion should I use with HTML?

Best regards,

Posted by: Christian J Nov 29 2017, 07:47 AM

30 million cells might be too much for a static HTML table, but if the size is manageable you might search them with javascript.

Otherwise you could put them in text file on the server (known as a https://en.wikipedia.org/wiki/Flat_file) which can then be searched by a HTML form and e.g. a PHP script directly, or you could also use a proper database (paid web hosts offer that) and a DB base query (with e.g. MySQL).

To query a DB quickly (as soon as the user enters values, as opposed to submitting a form), you can use Ajax (which is a way for javascript to communicate directly with a serverside script).

So in total you might use HTML, javascript, PHP and a DB query language (e.g. MySQL). There might be readymade packages that simplify the process a little.


Posted by: pandy Nov 29 2017, 06:59 PM

QUOTE(Christian J @ Nov 29 2017, 01:47 PM) *

30 million cells might be too much for a static HTML table, but if the size is manageable you might search them with javascript.


Scratch "may". laugh.gif

Posted by: Christian J Nov 30 2017, 06:13 AM

How much would 30M cells need for the HTML table, one or two Gigabyte? I was thinking with todays connection speeds and computer hardware it could be pulled off.

Posted by: pandy Nov 30 2017, 05:37 PM

Just 30 M table rows with a single cell with 15 digits in it is close to 1 GB if you stick to ANSI. On my 200 Mb fiber connection that would take about 40 minutes to download, provided I did the math right and I really got 200 Mb, which I don't. In addition to that I think the browser would freeze at an early stage. Not to think of what would happen if you tried to apply JS to that monster.

Posted by: Christian J Nov 30 2017, 06:11 PM

You're absolutely right about 1GB, not sure what I was thinking there. blush.gif That leaves server-side scripting then, probably a database.

Posted by: pandy Dec 1 2017, 09:21 AM

And then I didn't count the 30 M - 1 line breaks. But maybe it doesn't need to be pretty. tongue.gif

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)