Armory parseing code

Miscellaneous code snippets and examples that members have posted

Armory parseing code

Postby lart » Tue Mar 20, 2007 7:55 am

I haven't seen anyone else working on this code and I don't see anything on the armory site that says you can't use it and there's not robots.txt. Right now I just parse out the guild page. This script needs curl and I think php 4.3 might need 5.
There's some info that I can't get from the armory so havening it import data into the roster is going to be a little harder as I can't just use the code that's already there.
What I need to have done is for people to test out the code and let me know how you broke it. I have plans to import data to the database at some point but that's after i get some more stuff parsing.
version .0.1
(8.19 KiB) Downloaded 151 times
Last edited by lart on Tue Mar 20, 2007 7:58 am, edited 1 time in total.
lart Apprentice Apprentice
Posts: 2
Joined: Thu Aug 03, 2006 8:23 am

Armory parseing code

Postby Toto » Tue Mar 20, 2007 12:54 pm

Some code was already posted here to better do the parsing.

With this code you get a XML file that you can easily parse with the xml parser of your choice. No Page checking and html gathering.

$curl = curl_init();
$fp = fopen("Temp/Tolriq.xml", "w");
$useragent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20061204 Firefox/";
curl_setopt($curl, CURLOPT_USERAGENT, $useragent);
curl_setopt ($curl, CURLOPT_URL, "");
//curl_setopt ($curl, CURLOPT_URL, "");
//curl_setopt ($curl, CURLOPT_URL, "");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_FILE, $fp);
curl_exec ($curl);
curl_close ($curl);
Toto Apprentice Apprentice
Posts: 5
Joined: Sun Jan 14, 2007 8:53 pm

Re: Armory parseing code

Postby Kristoff22 » Tue Mar 20, 2007 9:45 pm

I saw this post a little late, but I've already created a synch addon between Armory and Roster. You can see it here:
Roster AddOn Dev
Roster AddOn Dev
Posts: 103
Joined: Mon Nov 13, 2006 5:54 am

Re: Armory parseing code

Postby lart » Thu Mar 22, 2007 12:49 am

oo I'm glad that I posted this before I did much more work. I wonder why I didn't see that when I searched.
lart Apprentice Apprentice
Posts: 2
Joined: Thu Aug 03, 2006 8:23 am

Armory parseing code

Postby jungzandvliet » Thu Mar 22, 2007 10:21 pm

Becouse this one is earlyer posted theN:
jungzandvliet Apprentice Apprentice
Posts: 10
Joined: Sat Aug 05, 2006 8:17 pm

Return to Code Cache

Who is online

Users browsing this forum: No registered users and 0 guests