Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

fixed, thanks! Now on to figure out how Web API works...

share|improve this question

put on hold as off-topic by l̕aͨŵƦȆ̴̟̟͙̞ͩ͌͝ƞCͭ̏ȇ ƇhƐȓ0nè, andrewsi, Simon _eQ, DaveRandom, Stony yesterday

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist" – l̕aͨŵƦȆ̴̟̟͙̞ͩ͌͝ƞCͭ̏ȇ ƇhƐȓ0nè, Simon _eQ, DaveRandom, Stony
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

You need to replace all your calls to class methods. From - to -> your missing > as PHP looks at it as $req minus the value of function setMethod(HTTP_REQUEST_METHOD_GET); which is not a function but rather a class method.

E.G:

echo "Inviting $invite_steam_id ($fid): ";
$req->setMethod(HTTP_REQUEST_METHOD_GET);
$req->setUrl($url);

$res = $req->sendRequest();
if (PEAR::isError($res))
die($res->getMessage());

Also you may need to look and fix the class to not rely on any reference passing as its Deprecated, it is not required and can be removed:

$req = &new HTTP_Request('https://steamcommunity.com');

Should be:

$req = new HTTP_Request('https://steamcommunity.com');

That will fix the Deprecated notices.

share|improve this answer
Thanks, will do! I'll test this out and let you know how it goes. – Finn C 2 days ago
Okay, I did all that, but now, I'm getting this error (well, these 3, counting deprecation): – Finn C 2 days ago
Deprecated: Assigning the return value of new by reference is deprecated in /var/www/invite_steam.php on line 33 Notice: Undefined index: i in /var/www/invite_steam.php on line 8 Login: ok Fatal error: Call to undefined function gmp_init() in /var/www/invite_steam.php on line 23 – Finn C 2 days ago
Remove the & when calling the class Check out stackoverflow.com/questions/1086539/… – l̕aͨŵƦȆ̴̟̟͙̞ͩ͌͝ƞCͭ̏ȇ ƇhƐȓ0nè 2 days ago
Alright, fixed that. 2 to go, haha. – Finn C 2 days ago
show 11 more comments

Not the answer you're looking for? Browse other questions tagged or ask your own question.