Use the preg_match() function with Regex and it'll grab the string and put it into an array for you.

Do not use the eregi set of functions for pattern matching, they're deprecated.
Loget Reviewed by Loget on . [help] Detect session on URL Need to do an function to detect and clean sessions from urls. Beter way i guess are by regex Session example: URL?s= 123gdggdtetft241ytf1ytf4oht5rfde URL?sid= 123gdggdtetft241ytf1ytf4oht5rfde ?= {32} Please if you know other kind of sessions post them. Rating: 5