Skip to content
TORNLIFE More

Dr-Greenthumb: forum

Dr-Greenthumb [87775] Level 43

Forum posts (Torn's count)
56 observed
Archived posts
37
Threads started (archived)
5

Boards

From the 37 newest archived posts.

Threads started

Most-liked posts

Likes as archived at fetch time, adjusted for how long each post had been up. Scored posts only; the full score pass runs after the import.

Marriage bug still not fixed · · 1 like


Hi there, I was a victim to the bug where it changed my marriage status to someone who hasn't been logged in for about 10 years. Can you revert this please? I did comment on another bug post about it but nothing was done.

Thanks :)

Finding items net worth · · 2 likes


Hi everyone, was hoping someone could answer this for me.

Today I found a Casino Pass in the city and I've noticed that my net worth has now shot up to around the same price as Casino Passes currently are. I have not yet/do not have plans to sell it but I was curious because I didn't think found items would go towards net worth? In addition, will my net worth deplete if say over the next couple of weeks (really wanting that award haha)?

A basic PHP script to grab faction member names · · 0 likes


Hi guys,

I haven't really looked much at the API as of yet, but I am really liking this idea. I have many ideas planned (for when I have the time) for some tools I wish to create and which I hope you will all use and find useful. A fellow faction member was having issues with something with the API so have spent 10 minutes just quickly looking through some of the documentation (what there is of it anyway) and just wrote this very very very simple script. It simply just grabs all the member names from your faction. The reason I am posting is for those who are having issues understanding how to get specific results from json objects. In this case, these objects come in the form of 'members'. It's piss easy to say the least but I feel if I help with the very simple stuff, even those without much knowledge will learn. In the future I plan to release bigger ideas (in tutorial form) and aforementioned, proper tools that will be able to help you through the game (open-sourced too).

<?php

$faction_id = ''; //Faction ID
$api_key = ''; //Personal API Key

$api_link = "http://api.torn.com/faction/$faction_id?selections=&key=$api_key"; //Link to JSON data

$json = file_get_contents($api_link); //Request JSON data from API
$data = json_decode($json, true); //Decode JSON as array

foreach($data['members'] as $member) { //Loop through each member object
echo $member['name'] . "<br />"; //Print name of member object
}

?>

Returning Items to the Faction · · 0 likes


Dr-Greenthumb has retrieved one of the faction's Minigun items from you.



Is this the correct message to be displayed? I returned the Minigun item to my faction (I am not the leader) and I got this message? It just doesn't seem right. Using Chrome.

SQL queries showing during attack · · 0 likes


Hi there,

I initiated an attack around 3 minutes ago. As I attacked I realised the web page was echoing the SQL insert after each hit:



INSERT INTO items_stats_links (armouryID, statID, value) VALUES (1503608556,1,498) ON DUPLICATE KEY UPDATE value = value + 498

INSERT INTO items_stats_links (armouryID, statID, value) VALUES (1503608556,7,498) ON DUPLICATE KEY UPDATE value = value + 498

INSERT INTO items_stats_links (armouryID, statID, value) VALUES (1503608556,3,1) ON DUPLICATE KEY UPDATE value = value + 1

INSERT INTO items_stats_links (armouryID, statID, value) VALUES (1546888631,5,498) ON DUPLICATE KEY UPDATE value = value + 498

INSERT INTO items_stats_links (armouryID, statID, value) VALUES (1546888631,9,498) ON DUPLICATE KEY UPDATE value = value + 498

INSERT INTO items_stats_links (armouryID, statID, value) VALUES (1546888631,8,1) ON DUPLICATE KEY UPDATE value = value + 1



I am using Google chrome. Sorry, I do not have enough energy to try it again. It has never happened before.

Recent archived posts

Marriage bug still not fixed · · 1 like


Sorry, had a really busy day and only have just managed to get on. I've now divorced him.

Marriage bug still not fixed · · 1 like


Hi there, I was a victim to the bug where it changed my marriage status to someone who hasn't been logged in for about 10 years. Can you revert this please? I did comment on another bug post about it but nothing was done.

Thanks :)

Delete ·


I have this bug too! I'm meant to be married to StickyIcky but now married to someone inactive for over 3000 days.

Lifting the Cooldown from the " Spin the Wheel " ·


Not at all. This would be the case if one of the rewards disappeared every time you spun. Your "basic numbers" do not include the possibility of getting the same reward twice...

done ·


Hey dude, I ran from you quite a fair bit but still received no cash?

Extreme Lag and 504's and 550's and 503's.... ·


I know many people have raised the issue, but I'm also getting the mongoDB 133 error.

Daily Random Survey! · · 1 like


From a UK perspective it really hurts me to see how brainwashed people are about this whole trump thing. I'm not here to change your views because your opinion is your opinion. But having trump as your leader is a scary, scary thought. A man with too much money with very little intelligence - it's a fact that he doesn't do his job, he has people to do his job for him. In the U.S he's a public figure and should no way be involved with politics - he's not a politician! "he is not a secret muslim" - this implies that there is something wrong with muslims? There really isn't. There are 1.6 billion muslims in the world and a very very small minority that have gone extremist. The only reason you are told to hate them is through media propaganda. But what about all the Christians that go into schools/universities and carry out a massacre? They don't get put on the news with a "Christian" title in front of their name. Because the media want you to hate muslims because "they are all terrorists". But christians? No they can't be! Strange right? Trumps promise about, pretty much, taking out Muslims from America is disgraceful and only a little short of what hitler proposed. How about that mexico comment too? The guy is a bigot and Americans are only following him because "everyone loves trump". The things he's proposed will be dangerous and have serious consequences. I could sit here all day and type his policies but as you pointed out a muslim comment I thought i'd stick on that front. The president IS NOT the most powerful person in the world/ let alone America. It's the corporations, people with money and people higher up than the president. Trump will be a puppet and play for other's gains. It America want someone good, they need someone who has a leg to stand on.



Peace.

how-to ·


Oh yeah, haha, I didn't even look at the address bar :P I think if people are really concerned about losing their API key then maybe it would be best for them not to create anything at all at this moment in time - unless they really want to put the effort in. Or treat it how you would database information - aforementioned - possibly storing it outside of the public_html.

how-to ·


This is true. But none of this site runs of HTTPS anyhow - including the API. If you're going to go as far as keeping it secure, another way is to store the key outside of the public folder and/or encrypt it.

how-to · · 1 like


This is how you would grab strength, for example, but you will need both the user's ID and key to access the information.

<?php

$user_id = ''; //User ID
$api_key = ''; //Personal API Key

$api_link = "http://api.torn.com/user/$user_id?selections=battlestats&key=$api_key"; //Link to JSON data

$json = file_get_contents($api_link); //Request JSON data from API
$data = json_decode($json, true); //Decode JSON as array

echo $data['strength'];

?>

A basic PHP script to grab faction member names ·


You don't need to escape the string if between double quotes :)

EDIT: Also I've used single quotes for the key and id, not double - not a correction.

A basic PHP script to grab faction member names ·


Btw, how the hell do you add code tags within a forum post? For some reason it wont let me...

A basic PHP script to grab faction member names ·


Hi guys,

I haven't really looked much at the API as of yet, but I am really liking this idea. I have many ideas planned (for when I have the time) for some tools I wish to create and which I hope you will all use and find useful. A fellow faction member was having issues with something with the API so have spent 10 minutes just quickly looking through some of the documentation (what there is of it anyway) and just wrote this very very very simple script. It simply just grabs all the member names from your faction. The reason I am posting is for those who are having issues understanding how to get specific results from json objects. In this case, these objects come in the form of 'members'. It's piss easy to say the least but I feel if I help with the very simple stuff, even those without much knowledge will learn. In the future I plan to release bigger ideas (in tutorial form) and aforementioned, proper tools that will be able to help you through the game (open-sourced too).

<?php

$faction_id = ''; //Faction ID
$api_key = ''; //Personal API Key

$api_link = "http://api.torn.com/faction/$faction_id?selections=&key=$api_key"; //Link to JSON data

$json = file_get_contents($api_link); //Request JSON data from API
$data = json_decode($json, true); //Decode JSON as array

foreach($data['members'] as $member) { //Loop through each member object
echo $member['name'] . "<br />"; //Print name of member object
}

?>

Happy Birthday Torn! · · 2 likes


This game has just got stronger and stronger. From what it was 10/11 years ago (still a great game) to what it is now is such an amazing achievement. Happy birthday torn!

ALL Slutting Services · · 1 like


NO MORE THANK YOU! :)

Returning Items to the Faction ·


Dr-Greenthumb has retrieved one of the faction's Minigun items from you.



Is this the correct message to be displayed? I returned the Minigun item to my faction (I am not the leader) and I got this message? It just doesn't seem right. Using Chrome.

Favorite Burger joint ·


Too many to choose in the UK

Guess the number of candy - Halloween 2015 ·


295

Torn Super Six - Round One - Halloween 15 · · 1 like


Crystal Palace 1 3 Man United

Swansea 0 2 Arsenal

Man City 3 0 Norwich

Watford 0 2 West Ham

Newcastle 1 1 Stoke

West Brom 0 1 Leicester

Golden goal prediction: 8th Minute

SQL queries showing during attack ·


Hi there,

I initiated an attack around 3 minutes ago. As I attacked I realised the web page was echoing the SQL insert after each hit:



INSERT INTO items_stats_links (armouryID, statID, value) VALUES (1503608556,1,498) ON DUPLICATE KEY UPDATE value = value + 498

INSERT INTO items_stats_links (armouryID, statID, value) VALUES (1503608556,7,498) ON DUPLICATE KEY UPDATE value = value + 498

INSERT INTO items_stats_links (armouryID, statID, value) VALUES (1503608556,3,1) ON DUPLICATE KEY UPDATE value = value + 1

INSERT INTO items_stats_links (armouryID, statID, value) VALUES (1546888631,5,498) ON DUPLICATE KEY UPDATE value = value + 498

INSERT INTO items_stats_links (armouryID, statID, value) VALUES (1546888631,9,498) ON DUPLICATE KEY UPDATE value = value + 498

INSERT INTO items_stats_links (armouryID, statID, value) VALUES (1546888631,8,1) ON DUPLICATE KEY UPDATE value = value + 1



I am using Google chrome. Sorry, I do not have enough energy to try it again. It has never happened before.