Post
Topic
Board Project Development
Re: [project] api.loyce.club: crowdsourcing Bitcointalk data
by
CryptoNeed
on 26/06/2019, 06:11:50 UTC
I'm assuming he uses a script to build it.

Yes for sure. At least I hope so.  Grin
By hand I meant sth like fetching data from the website via script.

I pm'd him an "updated" version to have forms at the html one, so that the loaded script doesn't appear totally empty.
How is your progress on the combined script with RegEx, Initscri?

Code:


Merit LookUp



Donor:



Recipient:


//GET Request by: merithtml.php?donor=USERID

$url "merit.all.txt"
$file file($url);
$file str_replace(" "",",$file);
$file str_replace("\r\n""",$file);
// put the array together
foreach ($file as $line => $value) {
$value explode(","$value);
    
$bigArray[] = array("Donor" => $value[3], "Recipient" => $value[4], "Merits" => $value[1], "Msg" => $value[2], "DTG" => $value[0]);
}

function 
searchForDonor($uid$array) {
echo "";
foreach ($array as $key => $val) {
if($val["Donor"] === $uid) {
//print_r($array[$key]);
echo "





";

}
echo "
".date("d.m.Y H:i:s"$val["DTG"]).".$val["Msg"]."#"strstr($val["Msg"], "msg")."'>".$val["Msg"].".$val["Donor"]."'>".$val["Donor"]."-(".$val["Merits"].")->.$val["Recipient"]."'>".$val["Recipient"]."
"
;
return null;
}

function 
searchForRecipient($uid$array) {
echo "";
foreach ($array as $key => $val) {
if($val["Recipient"] === $uid) {
//print_r($array[$key]);
echo "





";

}
echo "
".date("d.m.Y H:i:s"$val["DTG"]).".$val["Msg"]."#"strstr($val["Msg"], "msg")."'>".$val["Msg"].".$val["Recipient"]."'>".$val["Recipient"]."<-(".$val["Merits"].")-.$val["Donor"]."'>".$val["Donor"]."
"
;
return null;
}

if(isset(
$_GET["donor"])) {
searchForDonor($_GET["donor"], $bigArray);


if(isset(
$_GET["recipient"])) {
searchForRecipient($_GET["recipient"], $bigArray);

}

?>





Also, I decided to regain some of my PHP skills. Have forgotten how much fun it is.  Smiley

Haven't had a chance to make any modifications as of yet. Been swamped.

Is that the new code you're working off of?

Nah, currently not working on it as I have some social events coming up this week. I just added a form and thats all.
Will have some time next week.