mIRC Home    About    Download    Register    News    Help

Print Thread
#88059 24/06/04 05:36 PM
Joined: Jun 2004
Posts: 2
S
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Jun 2004
Posts: 2
My friend needs some help with a script he wrote.

Here is our conversation we had about it:
Quote:

> what kind of script do you need
<Box> u familiar with crux?
> nope
<Box> hm, prolly dont matter then but its the box in the boxtorrents channel, one of the scripts i wrote for it stores stats, I am looking to get a php parser, as the mirc way of createing each webpage staticly takes along time (talking of 30mins+
> so you want a php parser basically
<Box> exactly
> is this for crux
<Box> yes, its so i can upload the statfile + php file for a little irc stats thing


I made a link to the log file and the actual script

http://www.aeforums.net/downloads/script_stuff.zip

PS. The people that get theis to work can get a shiny new gmail account and my eternal gratitude

#88060 25/06/04 01:35 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
You want a simpel php Script to parse the .ini file? Or is it something further than that?


-KingTomato
#88061 25/06/04 01:39 AM
Joined: Jun 2004
Posts: 2
S
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Jun 2004
Posts: 2
something simple would be fine, like he said, it takes 30 minutes to do it the mIRC way.

#88062 25/06/04 04:29 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
What is in %124 in the script?


-KingTomato
#88063 25/06/04 06:46 PM
Joined: Jun 2004
Posts: 4
Z
Self-satisified door
Offline
Self-satisified door
Z
Joined: Jun 2004
Posts: 4
Well, if you REALLY want a script to parse it, just give me an example of what the page looks like, but, for now, I'll just give you the general idea in PHP to do it easily.

Code:
&lt;?php

	//make this the full path to the ini file
	$file = "c:\path\to\file.ini";

	//put it into a multidimensional array
	$ini = parse_ini_file($file, true);

	//and now print it
	echo ( "&lt;pre&gt;" );
	print_r ( $ini );
	echo ( "&lt;/pre&gt;" );

?&gt;


This will take the following ini (this is just an example)...

Code:
[Section1]
value1=testing
value2=testing

[Section2]
value3=testing
value092=testing


And display...

Code:
Array
(
    [Section1] =&gt; Array
        (
            [value1] =&gt; testing
            [value2] =&gt; testing
        )

    [Section2] =&gt; Array
        (
            [value3] =&gt; testing
            [value092] =&gt; testing
        )

)


So...hope that helps, if you need more, just send me an email at [email]amale@zibings.com.[/email]


Yep. I dun gone there.
#88064 25/06/04 07:58 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
I have just a little more than that---
http://www.kingtomato.org/saiyaman/

And the ini is 2 megs in size, and contains characters pare_ini_file doesn't like. ;d


-KingTomato
#88065 25/06/04 09:43 PM
Joined: Jun 2004
Posts: 4
Z
Self-satisified door
Offline
Self-satisified door
Z
Joined: Jun 2004
Posts: 4
Ok... Was just giving an example of the easiest way to handle it with PHP.


Yep. I dun gone there.

Link Copied to Clipboard