- explode: documentation ( source)
<?php
echo getTargetUrl("https://api.32r.com/jump.php?target=https://www.wanmei.com/safestatic/privacy.html");
function getTargetUrl($str){
$parts = explode('?target=', $str);
if (!empty($parts['1'])){
return $parts['1'];
}
return $str;
}