Jump to content
#StayAtHome ×

Creating a database or... (CAR/TYRE guys take a look)

Recommended Posts



So, I have a .pdf file which contains information on car tyre parameters (which tyre fits where).

The mission is to have that data to show up on a website for the user to be able to search/view it.

There is around 30 000 entries and before I go and start copying them one by one into my HTML tables or database I would like to know if you guys got any ideas if I can somehow fasten that process (or do it in another way?).

Even better, if you know any kind of API or something that I can just add to website ( example : http://www.michelin.co.uk/ ) that would be great.

I don't want to iframe-lame it.


Thank you & have an awesome day!

Edited by IamSuchANoob

Share this post

Link to post
Share on other sites

If you don't mind too much, I'm going to remove that link you posted. Drive-by malware is not cool.



Share this post

Link to post
Share on other sites

It'd totally expect you could copy/paste those pages (probably many at a time, or even all at once) into Excel or Google Sheets, then get a CSV version of it. That'd make importing very easy.

Share this post

Link to post
Share on other sites

Thank you for the answer. I have never done this (PDF->XLSX->CSV). Could you tell me, if this output can be used before I am going to figure out how?

;;;;;;;;;;Rehvide valiku tabel;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Mark;;Mudel;;;Mootor;;;;;;;Laius Kõrgus ZR;;"R """;;LI;SI;XL e4txc4;;;;;;;;;;;;;;;;;;;;;;;;

Share this post

Link to post
Share on other sites

to process a single line like that you can

$str = 'Mark;;Mudel;;;Mootor;;;;;;;Laius Kõrgus ZR;;"R """;;LI;SI;XL e4txc4;;;;;;;;;;;;;;;;;;;;;;;;';
$data = array_filter(str_getcsv($str,';'));  // ignore empty values 
echo '<pre>',print_r($data, true),'</pre>';  // view the data array

which gives

    [0] => Mark
    [2] => Mudel
    [5] => Mootor
    [12] => Laius Kõrgus ZR
    [14] => R "
    [16] => LI
    [17] => SI
    [18] => XL e4txc4

To process the whole file you use fgetcsv, which is similar.

Share this post

Link to post
Share on other sites

Join the conversation

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

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.