whats the best way to get the user id of any given user with PHP
Printable View
whats the best way to get the user id of any given user with PHP
There's probably a getstringbetween function out there somewhere.
Starting text: http://www.gaiaonline.com/profiles/
Ending text: /
theres no sure way to get it from the html?
im using get_file_contents to get the profile page at "http://www.gaiaonline.com/p/username"
i know v2 profiles its always hooked to the username in the top right corner,
but how about v1 profiles?
also i do already have the getstringbetween function
This is a random person's page. They have a V2 profile. That bar at the top has their name and a link to their profile.Code:<div id="gaia_header">
<ul id="header_left">
<li class="spacer"></li>
<li><a href="/"><img src="http://s.cdn.gaiaonline.com/images/profile/mini_gaialogo.gif" width="47" height="23" alt="Gaia"/></a></li>
<li><a href="/market/">Shops</a></li>
<li>| <a href="/forum/">Forums</a></li>
<li>| <a href="/world/">World</a></li>
<li>| <a href="/games/">Games</a></li>
</ul>
<ul id="header_right">
<a href="http://www.gaiaonline.com/register/?_gaia_t_=3544" style="text-decoration:none;">
<img src="http://s.cdn.gaiaonline.com/images/fbconnect/buttons/btn_register_now.png" width="102" height="22" alt="Register Now"/>
<span style="color:#c67100;margin-right:20px;">Get your own profile/avatar or leave a comment</span>
</a>
<li><a href="/profiles/?u=2011306">Jasper Riddle</a></li>
<li>| <a href="/auth/">Sign In</a></li>
</ul>
</div>