...

View Full Version : Need script - Will pay!



JobNeedsDone
05-20-2012, 02:40 AM
Hi guys,

I've came to a problem, I have my members details in two .txt files.

1.txt and 2.txt

1.txt containing there name and 2.txt containing there address.

Each line in the txt file ends with there 13 digit membership number.

So what I've been doing is copying the membership number from 1.txt and searching 2.txt to match the name to the correct address.

I need some sort of script in which i can paste all membership numbers 1 per line and combine the lines together. For example:

I list the membership numbers.
I load 1.txt and 2.txt

123456789 being the first membership number to process.

Joe Soap 123456789 is found in 1.txt
11 Bubble Bath Lane 12356789 is found in 2.txt

Output.txt -> Joe Soap 123456789 11 Bubble Bath Lane 12356789


If anyone has the idea of what i need done here and your capable of doing it, im willing to pay for this sort of script.

It doesnt need to be in PHP

I can't do this manually since there is thousands.

Please reply with your skype/msn/messenger if you can do this we will talk about a price.

jmj001
05-20-2012, 04:35 AM
I've got a deal for you... ;)

Paste a 3 line extract from both the files in here and I'll write you a script to do it and paste in in here for you.

Once you have the script and tested it and extracted all your data you can pay me $5

How's that? :cool:

JobNeedsDone
05-20-2012, 05:36 AM
"id","members name","access code","expiration","pin","173920"
"id","members name","access code","expiration","pin","628419"
"id","members name","access code","expiration","pin","704241"

"address","city","state","","zip","077315"
"address","city","state","","zip","238403"
"address","city","state","","zip","222709"

I have edited out confidential information and replaced with field names..
As you can see the end numbers are the membership numbers, both files contain those at the end of each line, i need the ones that match to be combined/merged into one line and put into an output file

So it would come out like this:

"id","members name","access code","expiration","pin","704241" "address","city","state","","zip","704241"



If you can do the script i require, I'll pay you 25x $5 ;)

_Aerospace_Eng_
05-20-2012, 08:09 AM
I can do this for you. I have sent you a PM. What do you want to happen if there isn't a match?

jmj001
05-20-2012, 12:37 PM
@jobsneedsdone - just got back and starting on this for you now. Will post the code here for you within 30 minutes.....

jmj001
05-20-2012, 01:22 PM
OK, this script below should do the job that is assuming the following:

1 - the files with content are exactly as you have describe with no other header lines or anything out of place
2 - the file are readable and in the same drectory as this script
3 - you hold your mouth at just the right angle when pushing the button :p

anyway... this is a first test... let me know how it goes.


<?php
/*
put this script in the same directory as the two files and put the file names in below.
*/
// enter the file names here
$file1 = 'file-1.txt';
$file2 = 'file-2.txt';

$data1 = filetoarray($file1,6); // you can actually specify the column the id is in if it's different in each file... although it seems to be the same from your dataset extract... at column 6
$data2 = filetoarray($file2,6);

// now loop through one of the datasets and match the keys with the other
// build the keys list
$dataSetKeys = array_keys($data1);
// loop through the keys and build the results
$j = count($dataSetKeys);
for($i = 0; $i < $j; $i++){
$thisKey = $dataSetKeys[$i];
if(isset($data2[$thisKey])){
echo $data1[$thisKey][0].','.$data1[$thisKey][1].','.$data1[$thisKey][2].','.$data1[$thisKey][3].','.$data1[$thisKey][4].','.$data1[$thisKey][5].','.$data2[$thisKey][0].','.$data2[$thisKey][1].','.$data2[$thisKey][2].','.$data2[$thisKey][3].','.$data2[$thisKey][4].','.$data2[$thisKey][5]."<br>";
}
}
// "id","members name","access code","expiration","pin","704241" "address","city","state","","zip","704241"



// functions...
function filetoarray($file,$idKeyCol){
$rawData1 = file_get_contents($file);
return cleanlines($rawData1,$idKeyCol);
}

function cleanlines($data,$idKeyCol){
// expand it at the linebreaks
$newData = explode("\n",$data);
$cleanData = array();
$j = count($newData);
for($i = 0; $i < $j; $i++){
$thisParts = explode(",",$newData[$i]);
$cleanData[$thisParts[$idKeyCol-1]] = $thisParts;
}
return $cleanData;
}
?>

JobNeedsDone
05-20-2012, 07:52 PM
Hey,

Thanks Jim, so im guessing i upload this to an ftp with my 2 files and run the script, after chmod'ing them correctly? thanks.

JobNeedsDone
05-20-2012, 08:01 PM
You sir are a genious, send me a PM and i will get you paid.

jmj001
05-20-2012, 09:40 PM
PM sent... I'm guessing it worked as required then? :thumbsup:

Cheers...

_Aerospace_Eng_
05-20-2012, 11:29 PM
Good luck trying to get paid. They can only use their bank, paysafe, skype minutes, or western union (eventually).

jmj001
05-21-2012, 02:29 AM
I guess we'll find out if he's an honest man...

_Aerospace_Eng_
05-22-2012, 06:07 AM
Let us know how it works out.

jmj001
05-22-2012, 08:22 AM
as expected.. no word from the OP for more than 24 hours now.. we'll see but it's looking like a non payment at this stage...

Puppet Master
05-24-2012, 06:24 AM
So did the OP pay you yet?

PayPal is always an option...

jmj001
05-24-2012, 12:21 PM
Nope, had no word from him for a couple of days now... he won't pay now, the little weasel got his code. :mad:

Xcermide1X
05-24-2012, 12:33 PM
report him for scamming

_Aerospace_Eng_
05-24-2012, 06:33 PM
So did the OP pay you yet?

PayPal is always an option...

That is what I told the OP then he said that his account was limited because he was unverified which is true that can happen but the limits are still pretty high even when unverified which is 500 USD.

jmj001
05-24-2012, 08:33 PM
report him for scamming

He'll just come back in here under another name.....

The best thing is to leave this thread open and make anyone who wants code pay first.

Partly one of the reasons I posted the code publicly is so in the future I can reference people back here if they don't want to pay upfront.

Anyway... it just means I can only eat soup tonight.. ;)

nibbrwebdevelop
05-25-2012, 07:55 AM
Lesson learned huh? ALWAYS take some payment in advance, and sign an agreement on the work with a clear proposal, timeline and payment schedule.

$5 anyway isn't worth crying about really :)

_Aerospace_Eng_
05-25-2012, 08:26 AM
Lesson learned huh? ALWAYS take some payment in advance, and sign an agreement on the work with a clear proposal, timeline and payment schedule.

$5 anyway isn't worth crying about really :)

It could have bought him a burger. Note though the OP did say he would pay "25 x5" which sounded too good to be true.

EpicWebDesign
06-13-2012, 04:41 AM
Nope, had no word from him for a couple of days now... he won't pay now, the little weasel got his code. :mad:

Funny... same guy offered me $150 to do this EXACT SAME job (he had it posted in a different thread though and then all subsequent contact with me was via PM and email) -- see quote below. I wrote 90% of the code to show that it was, in fact possible, and then provided samples on my server via email within 24 hrs. As a rule, I never provide I finished code to any client until they are paid in full, so he got a nice interface and functionality example from me (that worked), but no access to the actual code. (As he wanted to run it locally only, so even if he managed to hack my code, it wouldn't have worked for him the way I presented it in the samples) :cool:

Sent 7 emails and several PM's to see if it was acceptable (so I could zip it up and send the final deliverable to him) once he sent the promised PayPal payment. Never got a single response back. :mad:

Oh well... it didn't take up much time and actually ended up helping out another person in need of a similar script, so I just donated what I'd already written to them. I believe in karma. :thumbsup:


"idnu","namehere","accesscode","securitycode","expires","0114012077315""Address","City","State","","Zip","0114013212777"

Your correct in what you said, its something i need ran from my personal computer not via a server.. I've also added fieldnames above.

Some things i should make you aware of.. there is alot more addresses than there is in the name file. Also some addresses wont have a city inputted.

If you can do this, I'd be more than happy to pay you $150

Taro
06-13-2012, 04:55 AM
Funny... same guy offered me $150 to do this EXACT SAME job (he had it posted in a different thread though and then all subsequent contact with me was via PM and email) -- see quote below. I wrote 90% of the code to show that it was, in fact possible, and then provided samples on my server via email within 24 hrs. As a rule, I never provide I finished code to any client until they are paid in full, so he got a nice interface and functionality example from me (that worked), but no access to the actual code. (As he wanted to run it locally only, so even if he managed to hack my code, it wouldn't have worked for him the way I presented it in the samples) :cool:

Sent 7 emails and several PM's to see if it was acceptable (so I could zip it up and send the final deliverable to him) once he sent the promised PayPal payment. Never got a single response back. :mad:

Oh well... it didn't take up much time and actually ended up helping out another person in need of a similar script, so I just donated what I'd already written to them. I believe in karma. :thumbsup:

There should be ways to enforce a fair deal, the task for the money, vice versa. I probably agree that its good to just give a sample and then they have to pay a fraction otherwise there's no deal.

EpicWebDesign
06-13-2012, 08:09 AM
Thankfully this OP has been an aberation . The others have been polite, responded in a timely manner and did pay for the work provided. I don't usually respond to requests that include "willing to pay" in the title. I prefer to just offer free suggestions and potential solutions. But in this economy I'm willing to take the chance every so often when I have some free time. Luckily this is the only scammer I've come across thus far!

Thankfully, after so many years in this industry, i've learned to provide just enough to ensure I don't get ripped off :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum