Re: [PHP] Building an array from a URL

2001-04-06 Thread Plutarck
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

RE: [PHP] Building an array from a URL

2001-04-06 Thread Jonathan Sharp
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

Re: [PHP] Building an array from a URL

2001-04-05 Thread Mike Gifford
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 =

Re: [PHP] Building an array from a URL

2001-04-04 Thread Joe Stump
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',

Re: [PHP] Building an array from a URL

2001-04-04 Thread Knut H. Hassel Nielsen
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 :

Re: [PHP] Building an array from a URL

2001-04-04 Thread Delbono
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

Re: [PHP] Building an array from a URL

2001-04-04 Thread Mike Gifford
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:

Re: [PHP] Building an array from a URL

2001-04-04 Thread Joe Stump
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:

Re: [PHP] Building an array from a URL

2001-04-04 Thread Mike Gifford
Hi Joe, I don't doubt that at all.. However, my strings aren now looking like this.

Re: [PHP] Building an array from a URL

2001-04-04 Thread Mike Gifford
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.

Re: [PHP] Building an array from a URL

2001-04-04 Thread Joe Stump
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 .=