Page 1 of 1

Match posting PHP Script?

Posted: Sun Jan 16, 2005 2:14 pm
by woodfinx
Hello. I play Counter Strike in the league CAL, UGS, and XPL. I am in the process of designing our teams website and I was wondering if anyone could help me with a simple script to post scores after a match or if it is easier...just a script that extracts the scores out of the caleague.com website...they have XML http://caleague.com/?page=xml if it is easier than extraction...I just need the match information in some sort of poster or automatic updating so that i dont have to edit HTML every day.


**Edit : Moved to volunteer**

Posted: Sun Jan 16, 2005 7:01 pm
by feyd
so you want someone to do this for you, or would you rather we guide along the path of creation yourself?

Posted: Sun Jan 16, 2005 7:19 pm
by woodfinx
I am really busy school right now so if someone could make it I would be more than greatful for it. I'm sure if I had the time I could chop up a simple news posting code and get what I need but I don't have the time right now. It doesnt even have to be that complex. If I knew how to parse XML I wouldnt have this problem =D

Posted: Sun Jan 16, 2005 7:26 pm
by timvw
here is a small sample

Code: Select all

$data = file_get_contents('http://example/foo.bar');

// parse data into array
$parser = xml_parser_create();
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
xml_parse_into_struct($parser, $data, $vals, $index);
xml_parser_free($parser);

print_r($vals);
now it's only a matter of finding the right index in the array.

Posted: Mon Jan 17, 2005 6:25 pm
by woodfinx
rofl well if you could show me how to get just my teams matches that would be great I dont really understand that...=/