note 55411 rejected from function.preg-match by sean
| From: | sean@php.net | Date: | Tue, 02 Aug 2005 17:40:39 +0000 |
| Subject: | note 55411 rejected from function.preg-match by sean | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-92967@lists.php.net to get a copy of this message | ||
Note Submitter: h4lfl1ng at gmail dot com
----
Heres what im trying to accomplish with my small knowledge of php/mysql.
I have a form, with upload field/submit button. What i have is an .html file with lots of links,
what i
wanted to do is upload it with this form and have the php parse it and
spit each link into its own row in the database(mysql). Then i want to display it on a php page.
What i
dont know how to do is the parsing and the spitting into the db. If anyone has any suggestions,
please contribute.
( I want a php script to go into the code of an HTML page and scrape out all the links and paste
each one into a table.)
Here is the example html file:
Code:
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1 LAST_MODIFIED="1112453349">Bookmarks</H1>
<DL><p>
<DT><H3 LAST_MODIFIED="1112133187" PERSONAL_TOOLBAR_FOLDER="true"
ID="rdf:#$THWW13">Bookmarks Toolbar Folder</H3>
<DD>Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar
<DL><p>
<DT><A HREF="http://gmail.google.com/gmail"
ADD_DATE="1100829787" LAST_VISIT="1112496920" LAST_CHARSET="UTF-8"
ID="rdf:#$sJEgc3">Gmail - Inbox</A>
<DT><A HREF="http://www.onepine.info/eblogs/"
ADD_DATE="1112242822" LAST_VISIT="1112242831"
LAST_CHARSET="ISO-8859-1" ID="rdf:#$F.CrJ1">MACROMEDIA PDF
RESOURCES</A>
<DT><A HREF="http://www.winehq.com/site/helping-applications"
ADD_DATE="1112318804" LAST_VISIT="1112326505"
LAST_CHARSET="ISO-8859-1" ID="rdf:#$Q1DrJ1">Wine HQ</A>
<DT><A HREF="http://rpm.pbone.net/"
ADD_DATE="1112327407" LAST_CHARSET="ISO-8859-2"
ID="rdf:#$IhqtU2">RPM Search</A>
</DL><p>
-Ilya