Check if is a steamid

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

joaogl
New php-forum User
New php-forum User
Posts: 1
Joined: Thu May 30, 2013 12:16 pm

Check if is a steamid

Postby joaogl » Thu May 30, 2013 12:22 pm

Hello,

I'm making a register form where the client has to type his steamid.
How can I check if it is a steamid?

example steamid's(random numbers by me):
STEAM_0:0:54289050
STEAM_0:0:31375943
STEAM_0:0:92652307


I tried this but it gives me always an error.
if(empty($steamid) || !strpos($steamid,'STEAM_0:')) { $error = true; }

How can I do this?

seandisanti
php-forum Fan User
php-forum Fan User
Posts: 838
Joined: Mon Oct 01, 2012 12:32 pm

Re: Check if is a steamid

Postby seandisanti » Fri May 31, 2013 10:10 am

Make use of the steam API; http://steamcommunity.com/dev


Return to “PHP coding => General”

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron