Im working on some function to grab few data from url with simple html dom.
But one of the data is an image and image have question mark and some more info behind it
In a much easier way it could be:
$iWantThisURL = substr($curr_url(), 0, stripos($curr_url, '?'));