monkeytooth Posted November 10, 2008 Share Posted November 10, 2008 Ok I have a custom 404 error page. And one of the common setbacks, drawbacks, whatever you wanna call it is, when implemented they catch everything even the stuff the server would have ignored prior. My Common error is MS Office users. By defualt there browsers through an addon with MS Office looks for: /MSOffice/cltreq.asp?UL=1&ACT=4&BUILD=6254&STRMVER=4&CAPREQ=0 /_vti_bin/owssvr.dll?UL=1&ACT=4&BUILD=8164&STRMVER=4&CAPREQ=0 (as an example...) And I achieve finding that out via $_SERVER['REQUEST_URI']; So That said How would I find just: /MSOffice/cltreq.asp?UL= /_vti_bin/owssvr.dll?UL= and if found do something else with it, what I ultimately want to do is ignore it, as my error page sends me a email for ever error, and well thats starting to flood my box more often then less. Guess my problem is if its possible I cant figure out where I would put a wild card to throw out the rest past the UL= part.. or am I just looking at this wrong and can I just get a variable to define what I want based off the URI and then go from there? I have no idea, im burnt, help me :-) Link to comment https://forums.phpfreaks.com/topic/132178-php-if-else-then-wildcards-would-they-work-and-how/ Share on other sites More sharing options...
Barand Posted November 10, 2008 Share Posted November 10, 2008 $str = '/MSOffice/cltreq.asp?UL=1&ACT=4&BUILD=6254&STRMVER=4&CAPREQ=0'; list ($firstbit) = explode ('=', $str); echo $firstbit; // --> /MSOffice/cltreq.asp?UL Link to comment https://forums.phpfreaks.com/topic/132178-php-if-else-then-wildcards-would-they-work-and-how/#findComment-687010 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.