note 55411 added to function.preg-match

From: Date: Tue, 02 Aug 2005 17:33:24 +0000
Subject: note 55411 added to function.preg-match
Groups: php.notes 
Request: Send a blank email to php-notes+get-92966@lists.php.net to get a copy of this message
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 ---- Manual Page -- http://www.php.net/manual/en/function.preg-match.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55411 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55411&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55411&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55411&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55411&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55411&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55411&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55411&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#92966) next »