You'll probably want to play with the following function:
http://www.php.net/manual/en/function.parse-url.php
--
Plutarck
Should be working on something...
...but forgot what it was.
"Mike Gifford" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hello,
I'm
can you just use a POST instead of a get? seems it might be cleaner in this
case...
-js
-Original Message-
From: Plutarck [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 11:22 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Building an array from a URL
You'll probably want
Hi Joe,
this would be useful if I wanted to write to a URL, but I need to read from it.
Perhaps I wasn't clear in this.
Mike
Joe Stump wrote:
Ok - say you have this:
$foo = array(
0 = 'joe',
1 = 'stump',
2 =
FYI you can send data like this on the url:
http://www.foo.com/script.php?test[joe]=stumptest[harry]=bartest[jane]=scott
Then $test will be an array that translates to this in PHP:
?
$test = array(
joe = 'stump',
harry = 'bar',
Did you try to see if $HTTP_GET_VARS can help you ?
Its an array of every variable posted by GET (the way you described)
Else :
Split the different key/values with the delimiter '' and thereafter split the
elements in the array by '='
But first split the string into page and variables :
ril 04, 2001 6:12 PM
Subject: Re: [PHP] Building an array from a URL
Did you try to see if $HTTP_GET_VARS can help you ?
Its an array of every variable posted by GET (the way you described)
Else :
Split the different key/values with the delimiter '' and thereafter split
the
elements in the arr
I tried this, but it converted [ and ] to url friendly codes. Does this still
work?
Mike
Joe Stump wrote:
FYI you can send data like this on the url:
http://www.foo.com/script.php?test[joe]=stumptest[harry]=bartest[jane]=scott
Then $test will be an array that translates to this in PHP:
It works for me in production.
On Wed, Apr 04, 2001 at 08:56:53PM -0400, Mike Gifford wrote:
I tried this, but it converted [ and ] to url friendly codes. Does this still
work?
Mike
Joe Stump wrote:
FYI you can send data like this on the url:
Hi Joe,
I don't doubt that at all.. However, my strings aren now looking like this.
Hell Knut,
"Knut H. Hassel Nielsen" wrote:
Did you try to see if $HTTP_GET_VARS can help you ?
It's useful for pulling down the URL variables into an array, however I'd now
like to go to the next step of pulling out data of an array of arrays...
All of the files here are in a database.
Ok - say you have this:
$foo = array(
0 = 'joe',
1 = 'stump',
2 = 'there');
while(list($key,$val) = each($foo))
$args[] = 'array['.$key.']='.$val;
$url = 'http://www.server.com/script.html';
$url .=
11 matches
Mail list logo