Archive

Posts Tagged ‘name amp’

Parse Qfx And Insert – Php

May 1st, 2009 Comments off

We are looking for a new developer to outsource work to, so you may consider this project an interview.

We chose this project because it will show your skills and iniative.

The script basically has to take a QFX file (bank statement) and enter all the individual transactions into a database (MySQL).

The format is as follows:

<STMTTRN>
<TRNTYPE>POS
<DTPOSTED>20081130
<TRNAMT>-1000
<FITID>2008113001
<NAME>A SHOP SOMEWHERE
<MEMO>EFTPOS
</STMTTRN>

<STMTTRN>
<TRNTYPE>POS
<DTPOSTED>20081130
<TRNAMT>-1000
<FITID>2008113001
<NAME>A SHOP SOMEWHERE
<MEMO>EFTPOS
</STMTTRN>

<STMTTRN>
<TRNTYPE>POS
<DTPOSTED>20081130
<TRNAMT>-1000
<FITID>2008113001
<NAME>A SHOP SOMEWHERE
<MEMO>EFTPOS
</STMTTRN>

You must be quick and relaible – thank you.

Creation Of File With Hex 00

April 19th, 2009 Comments off

Hi!

Problem:

I have a file which is used for checking up information with a program. The program accesses the file and is getting the commands what to do out of the file. To seperate different commands in the file the HEX 00 method is used – this means in simple words.

The program looks in file for first command -> then for the hex 00 byte -> then for the next command -> then for the hex 00 byte and so on until the end is finished.

The program (file) is used for checking domain names. I do not want to create the files by hand and HEX editor anymore. I have created a demo file, which I need, in the attachment (by hand).

What I want:

I want to copy and paste a list (in a script or program) and it should create for me the data file in correct syntax (including hex00 for seperation).

There are 3 checks for .eu names in the file at the moment.

I want to extend this file (depending on the names I want to check).

In the file there are commands like

<domain:name>????.eu</domain:name>..
<domain:name>????.eu</domain:name>..
<domain:name>????.eu</domain:name>..

The ???? should be substituted with the names of the list

Example:

List has:

agej
ekgeg
hwhgz

So the file should have

<domain:name>agej.eu</domain:name>..
<domain:name>ekgeg.eu</domain:name>..
<domain:name>hwhgz.eu</domain:name>..

Each command block ends with </epp> and the HEX00 tag.

Program (or script) should create one command block per name in list and should end the file correctly with HEX00 tag between the command blocks.

Hope that all is ok.

Print Random Values From Array

April 14th, 2009 Comments off

I have this kind of an array and I need to get G value selected randomly and then print its content on table. For example from array G2 values: name, age and text. When page is refreshed next time array G3 might be ramdomly selected and its values from: name, age and text will be printed on own places on the page.

Very easy ‘project’. Its ready when a php page does just that.

$random = (rand()%3);
$girls = array ( “G1″ => array ( “name” => “g1 orange”,
“age” => “g1 banana”,
“text” => “g1 apple”
),
“G2″ => array ( “name” => “g2 white”,
“age” => “g2 green”,
“text” => “g2 black”
),
“G3″ => array (“name” => “g3 car”,
“age” => “g3 train”,
“text” => “g3 truck”
)
);

Bear