- parse_str: documentation ( source)
- parse_url: documentation ( source)
- in_array: documentation ( source)
- http_build_query: documentation ( source)
<?php
$link = 'http://www.triff-chemnitz.de/fuu/baar?sid=12rhdgsvgz3gfusgvc';
$url = parse_url($link);
parse_str($url['query'], $query);
foreach ($query as $key => $value) {
if (in_array($key, $this->removeQueryValues)) {
unset($query[$key]);
}
}
$url['query'] = http_build_query($query);
echo http_build_url($url);