Reading from custom api issues

Having a little problem getting nightbot to read the text since it believes it is too long, don’t quite know why. Here’s the website that I’m calling

http://thornrankgrabber.rf.gd/rlrank.php?username=ithornez&plat=steam&playlist=2s

The command i’m using is:

$(urlfetch http://thornrankgrabber.rf.gd/rlrank.php?username=ithornez&plat=steam&playlist=$(1))

Which then returns a string, however Nightbot replies with “[Response must be less than 400 characters]” but I’m pretty sure that’s not the case.

Any ideas?

Your host injects javascript during the request.
For example a file_get_contents call in PHP return this:

Oh right, that’s a pain. Don’t suppose there are any good hosting sites for php that you know of? I know i’m probably pushing it looking for a free one but I it was only a mess about project so I wasn’t wanting to spend anything.

I’m a little new to this side of things so I’m using this as a way to teach myself

Tons of good hosts, but free ones, not that I know of, sorry.

Yeh that’s fair enough really, I can’t expect too much from a free host.

Thanks for your help anyway, if you have any specific recommendations for a host that’d be great, something cheap that I can just pay through paypal would be helpful but no worries if you can’t think of anything.

I have used https://www.nearlyfreespeech.net/ a bit but not much recently. Quite inexpensive depending on your needs.

Thanks, I’ll keep that in mind for next time but thankfully my brother has agreed to host it as a subdomain of his own website so i’m good for now.

Slightly different problem now but it’s only minor, when I call the command
$(urlfetch http://rltracker.plus1designs.co.uk/rlrank.php?username=ithornez&plat=steam&playlist=$(1))
It returns a little more than expected,
<!DOCTYPE html><head></head><body> ithornez | Solo rank | Diamond I Division I ( 996 ) | Div Up ~2, Div Down ~15</body></html>
Any way I can just call the body?

EDIT: Fixed the actually returned part

Isnt that part of your code?

Yep, I’m an idiot… think that’ll work now. Turns out I didn’t understand html very well (pretty much the first time i’ve messed about with this stuff)

Thanks a lot for all this, appreciate the help.

Glad you got it resolved.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.