<?php
$url = "https://m.naughtyappetite.com/oth.php?dynamicpage=all_1cm_universal_light_n&ver=1";
$urlParams = array(
'source',
'transfer_to',
'ban_rm',
'pop_rm',
'txt_rm',
'zoneid',
'userid',
'userId',
'ver',
't_uod',
't_umbr',
'email',
'emlTrack',
'key',
'uniqmessageId',
'open',
'transferSource',
'cmpn',
'loc',
'cross',
'crossMask',
'_cbUrl',
'_disAL',
'_fData',
'utm_partner',
'clkid',
'clid',
'clbid',
'safeLP',
'campaigntype',
'redirectUrl',
);
$queryString = "";
function getParam($key) {
$url = "http://www.thirst-more.com/2207/campaign32813?safeLP=naughty&source=www.benaughty.com&transfer_to=naughtyappetite.com&ban_rm=000748865&zoneid=4661&userId=c078c5c84f7311e79a97441ea14ed80c&key=c7eee25af7c437abaf37c460b8d1f467&clid=927&clbid=33872&location=UKR&remType=Banner&targetSite=6747c8fb5b73abce100992b51af15eef";
$query = parse_url($url, PHP_URL_QUERY);
parse_str($query, $params);
return isset($params[$key]) ? $params[$key] : null;
}
$params = array_fill_keys($urlParams, "");
array_walk($params, function(&$item, $key){
$item = getParam($key);
});
$params = array_filter($params);
if (!empty($params)) {
$queryString = http_build_query($params);
}
die(var_dump($queryString, $params));
- Output for 7.3.24 - 7.3.33, 7.4.12 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
- string(198) "source=www.benaughty.com&transfer_to=naughtyappetite.com&ban_rm=000748865&zoneid=4661&userId=c078c5c84f7311e79a97441ea14ed80c&key=c7eee25af7c437abaf37c460b8d1f467&clid=927&clbid=33872&safeLP=naughty"
array(9) {
["source"]=>
string(17) "www.benaughty.com"
["transfer_to"]=>
string(19) "naughtyappetite.com"
["ban_rm"]=>
string(9) "000748865"
["zoneid"]=>
string(4) "4661"
["userId"]=>
string(32) "c078c5c84f7311e79a97441ea14ed80c"
["key"]=>
string(32) "c7eee25af7c437abaf37c460b8d1f467"
["clid"]=>
string(3) "927"
["clbid"]=>
string(5) "33872"
["safeLP"]=>
string(7) "naughty"
}
- Output for 8.3.5
- Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
string(198) "source=www.benaughty.com&transfer_to=naughtyappetite.com&ban_rm=000748865&zoneid=4661&userId=c078c5c84f7311e79a97441ea14ed80c&key=c7eee25af7c437abaf37c460b8d1f467&clid=927&clbid=33872&safeLP=naughty"
array(9) {
["source"]=>
string(17) "www.benaughty.com"
["transfer_to"]=>
string(19) "naughtyappetite.com"
["ban_rm"]=>
string(9) "000748865"
["zoneid"]=>
string(4) "4661"
["userId"]=>
string(32) "c078c5c84f7311e79a97441ea14ed80c"
["key"]=>
string(32) "c7eee25af7c437abaf37c460b8d1f467"
["clid"]=>
string(3) "927"
["clbid"]=>
string(5) "33872"
["safeLP"]=>
string(7) "naughty"
}
preferences:
103.57 ms | 403 KiB | 118 Q