title: How do I import specific data from a text file into mysql?
body: <p>I have a file downloaded from dbpedia, with contents that look like this:</p>
  
  <pre><code>&lt;http://dbpedia.org/resource/Selective_Draft_Law_Cases&gt; &lt;http://dbpedia.org/ontology/wikiPageExternalLink&gt;        &lt;http://supreme.justia.com/cases/federal/us/245/366/&gt; .
  &lt;http://dbpedia.org/resource/List_of_songs_recorded_by_Shakira&gt; &lt;http://dbpedia.org/ontology/wikiPageExternalLink&gt; &lt;http://www.shakira.com/&gt; .
  &lt;http://dbpedia.org/resource/Bucharest_Symphony_Orchestra&gt;   &lt;http://dbpedia.org/ontology/wikiPageExternalLink&gt; &lt;http://www.symphorchestra.ro/&gt; .
  &lt;http://dbpedia.org/resource/Bucharest_Symphony_Orchestra&gt; &lt;http://dbpedia.org/ontology/wikiPageExternalLink&gt; &lt;http://symphorchestra.ro&gt; .
  &lt;http://dbpedia.org/resource/Bucharest_Symphony_Orchestra&gt; &lt;http://dbpedia.org/ontology/wikiPageExternalLink&gt; &lt;http://www.youtube.com/symphorchestra&gt; .
  </code></pre>
  
  <p>I need to extract the title from the first part of each line (i.e. <code>Selective_draft_Law_Cases</code> in the first line, List_of_songs_etc in the second etc)) and save it in a mysql table together with the URL which is the third element in the same line, i.e.for the <a href="http://supreme.justia.com/cases/federal/us/245/366/" rel="nofollow">first line</a> 
  for the <a href="http://www.shakira.com/" rel="nofollow">second line</a>  etc. </p>
  
  <p>I also need to skip the very first line in the file which has different, irrelevant information.</p>
  
  <p>What's the fastest way to get this done in PHP? </p>
  
  <p>Note: The file is quite a big one (over 1 GB in size, over 6 million lines).</p>
  
  <p>Thanks in advance!</p>