Hi everybody,
what I have is a typical database entry like this: profile.php?userid=988&sid=...
You probably know the "Who is where"-pages in forums, where you can get information about the whereabouts of visitors to your page.
Now that visitors can view profiles of members, I as an admin would like to know whose profile they are watching without querying the database.
My question is: how do I extract the userid?
My approach was easy enoug, but it would take too much time.
I would have taken the substr($string,-19) to cut off the first part of it. But then it really puts me off, because I haven't got a clue how I can decide between integers and strings.
Of course, there is the possibility of looping through the whole string with if (is_numeric etc.) but that would take too much time.
Is there any way to extract the numbers between "=" and "&"?