headers->get('referer'); $url = 'http://test.qingweilai888.xyz'; $referer = str_replace('https://','',$referer); $referer = str_replace('http://','',$referer); $referer = trim($referer,"/"); if($referer == 'testwap.qinglakeji.com'){ $url = 'http://test.qingweilai888.xyz'; } if($referer == 'wap.qwljk.com'){ $url = 'http://qwlapi.qwljk.com'; } echo json_encode(['url'=>$url]); } }