Changes between some lines

Changes between some lines

am 25.12.2007 20:09:40 von The87Boy

I have some files with urls and the only change between the urls is
the id, which stands as an argument but how can I see the id it in the
easist way?

Re: Changes between some lines

am 25.12.2007 20:21:38 von The87Boy

On Dec 25, 8:09 pm, The87Boy wrote:
> I have some files with urls and the only change between the urls is
> the id, which stands as an argument

As an argument in the url, as you e.g. can see on this url:
http://localhost/index.php?cmd=14&id=3325253&from=2

> but how can I see the id it in the easist way?

Re: Changes between some lines

am 27.12.2007 18:06:07 von luiheidsgoeroe

On Tue, 25 Dec 2007 20:21:38 +0100, The87Boy wrote:=


> On Dec 25, 8:09 pm, The87Boy wrote:
>> I have some files with urls and the only change between the urls is
>> the id, which stands as an argument
>
> As an argument in the url, as you e.g. can see on this url:
> http://localhost/index.php?cmd=3D14&id=3D3325253&from=3D2
>
>> but how can I see the id it in the easist way?

In the request itself:
$_GET['id']

Parsing the url as a string in another file (if you'd like to examine th=
e =

target in another script for instance):
$id =3D false;
$url =3D 'http://localhost/index.php?cmd=3D14&id=3D3325253&from=3D2';
$querystring =3D parse_url($url, PHP_URL_QUERY);
if(!empty($querystring)){
parse_str($querystring,$array);
$id =3D isset($array['id']) ? $array['id'] : false;
}
-- =

Rik Wasmus

Re: Changes between some lines

am 28.12.2007 13:06:36 von The87Boy

On Dec 27, 6:06 pm, "Rik Wasmus" wrote:
> In the request itself:
> $_GET['id']

I already know this one, but it is possible, it is not localhost, and
there why I can not use this one

> Parsing the url as a string in another file (if you'd like to examine the
> target in another script for instance):
> $id = false;
> $url = 'http://localhost/index.php?cmd=14&id=3325253&from=2';
> $querystring = parse_url($url, PHP_URL_QUERY);
> if(!empty($querystring)){
> parse_str($querystring,$array);
> $id = isset($array['id']) ? $array['id'] : false;}

This was actually what I was searching for, but I did not know, there
was a PHP function, there why my question