Find Jobs
Hire Freelancers

SteamApi function to check if owned a game

$10-30 USD

Closed
Posted over 6 years ago

$10-30 USD

Paid on delivery
So i have this code //REFERRALS CMDS [login to view URL]('referrals use code', function(code, csrf) { var address = [login to view URL]['x-forwarded-for'] || [login to view URL]; if(coolDown[address]+1 >= time()) { [login to view URL]('message', { type: 'msg', tip: 'error', msg: 'We are already processing one of your requests, please be patient.' }); return; } else { coolDown[address] = time()+1; } if(csrf && code) { if(!steamIDCsrf[csrf]['code_used']) { [login to view URL]('SELECT steamid FROM users WHERE codeCreated = ' + [login to view URL](code), function(e, r) { if(e) throw e; if([login to view URL] == 0) { [login to view URL]('message', { type: 'msg', tip: 'error', msg: 'This code does not exist.' }); } else { if(r[0].steamid == steamIDCsrf[csrf]['steamid']) { [login to view URL]('message', { type: 'msg', tip: 'error', msg: 'You cannot redeem your own code.' }); return; } if((/^([a-zA-Z0-9]{1,12})$/.test(code)) == true) { [login to view URL]('UPDATE users SET balance = balance + 100, codeUsed = ' + [login to view URL](code) + ', referral = ' + [login to view URL](r[0].steamid) + ' WHERE steamid = ' + [login to view URL](steamIDCsrf[csrf]['steamid']), function(ccc, bbb) { [login to view URL]('UPDATE users SET ref_balance = ref_balance + 15 WHERE steamid = ' + [login to view URL](r[0].steamid), function(jk, kj) { newBalance(csrf); steamIDCsrf[csrf]['code_used'] = code; [login to view URL]('message', { type: 'msg', tip: 'alert', msg: 'You successfully redeem code ' + code + '.' }); }); }); } else { [login to view URL]('message', { type: 'msg', tip: 'error', msg: 'Invalid characters or the code have more than 12 characters.' }); return; } } }); } } }); And i want to add function to verify if steam profile have game pubg i have someting for this but no work i want to integrate this var out; out = curl("[login to view URL]" + user["steamid"] + "&format=json"); out = json_decode(out, true); if (!out["response"]) { throw new Exit(json_encode({ "success": false, "error": "You profile is private" }));; } var csgo; csgo = false; var key; __loop1: for (key in out["response"]["games"]) { var value; value = out["response"]["games"][key]; if (value["appid"] == 578080) { csgo = true; } } if (!csgo) { throw new Exit(json_encode({ "success": false, "error": "You dont have PUBG." }));; } to first code
Project ID: 15812014

About the project

2 proposals
Remote project
Active 6 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
2 freelancers are bidding on average $38 USD for this job
User Avatar
Check our many good reviews from our satisfied customers in software and websites development. We will make you happy Relevant Skills and Experience developer Stay tuned, I'm still working on this proposal.
$21 USD in 7 days
4.8 (31 reviews)
5.5
5.5
User Avatar
Hi If you hire me, i will complete your project perfectly. I am interested in your project. I want to have a talk with you about your project in detail. Relevant Skills and Experience Java, Javascript, PHP, Steam API Proposed Milestones $55 USD - 1
$55 USD in 1 day
3.4 (2 reviews)
1.4
1.4

About the client

Flag of ROMANIA
Romania
0.0
0
Member since May 4, 2017

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.