2014-11-13 2 views
-1

Я URL в следующем форматеПолучение проблемы при чтении строки запроса в PHP

http://domain.com/redirect?url=http://thirdpartydomain.com?aff_id=4234324&url=http://storesite.com/list/page/1 

Здесь я хочу, чтобы получить значение первого URL-адрес ключа, е.

http://thirdpartydomain.com?aff_id=4234324&url=http://storesite.com/list/page/1 

Что лучше, чтобы получить это,

Я пробовал предложенные методы над SO, но ни один из них не работал со мной.

ответ

0
$UrlYouNeed = substr($originalURL, strpos($originalURL, "=") + 1); 
+1

Может быть, '$ data' и' $ originalURL' должны быть такими же, Rigth? – fejese

+0

@fejese да, извините –

0
$your_string="http://domain.com/redirect?url=http://thirdpartydomain.com?aff_id=4234324&url=http://storesite.com/list/page/1"; 

$your_string_explode=explode("http://",$your_string); 

echo $your_string_explode[1]; 
Смежные вопросы