Are there any good scripts or programs out there that will parse the rdf files from dmoz. I have no idea what I am doing when it comes to xml 😕 and i dont know enough php to make a parser. I want to parse the rdf files into mysql. Or ... i have a program... could someone help me figure it out. I know that somewhere on the php.net site it tells me how to do this but ill be damned if i can find it. I want to install PHP command line under Windows XP and run a php file from the command line. How do I do this? I installed php for windows package and that gives me php.exe. When I click on that it opens a command prompt and if I type things in a hit enter like
it doesnt do anything just gives me another line in the command prompt to type something else and it still does nothing ... I have attached the install file... it is a program from sourceforge called suckDMOZ... plz help in either fashion.
One more question. How does this forum automatically detect line breaks and make them reappear after storing them in a database? Is there some parser or something that can detect line breaks and write in \n or whatever it is???
installation file
Pretty simple installation assuming you have PHP installed to run from the command line (see php.net for instructions on this if you don't) and a MySQL database set up. -have mysql database but dont have a clue how to install php to run from the command line
You will need a user/pass with rights to create a table in the database -have this
Just copy the four files to your working directory:
suckDMOZ_config.php
suckDMOZ_content_parser.php
suckDMOZ_structure_parser.php
suckDMOZ_dbconnect.php
-did that
Chmod them to 777 or whatever... so they're executable. -its on my local machine... windows xp.. if necessary i can use IIS of course... do I need to 777? thought that was *nix only
Get the latest RDF's from DMOZ (http://dmoz.org/rdf.html) and copy them to the same directory. -done
Set the variables in suckDMOZ_config.php to be correct for you. -yup
Run 'php -q suckDMOZ_content_parser.php > DMOZ_content_parser_result.txt &' to parse the content RDF
Run 'php -q suckDMOZ_content_parser.php > DMOZ_content_parser_result.txt &' to parse the structure RDF
-whats the difference between the two lines?? maybe should change content_parser with structure_parser for structure???
It will create both tables, "DMOZ_structure" and "DMOZ_content" for you if they don't exist. -they dont exist.. cuz i cant run the script
Thanks alot. Really appreciate someone taking the time to read this rather lengthly post and helping me out.