Retrieving Content
| From: | Rodrigo de Oliveira Costa | Date: | Fri, 02 Jun 2006 14:24:18 +0000 |
| Subject: | Retrieving Content | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-237272@lists.php.net to get a copy of this message | ||
Hi guys, I'm trying to retrieve a certain variable from a site. Here it goes:
The site has a SELECT box that is dynamicaly updated, I need to put a
script running that will retrieve the specified SELECT with its
contents, that are labels and values. Is there a way to retrieve the
page and then select just one line of the code, discard the rest and
then retrieve from this line the values?
Here goes the SELECT :
<SELECT title='navigation' Name=navigating onChange="self.location =
'/s/2318355/'+ this.options[this.selectedIndex].value + '/';"><option
value=1 selected>1. Name<option value=2 >2. Name</select>
I need to get something like this:
$select = navigating;
$label1 = "1.Name";
$value1 = 1;
$label2 = "2.Name";
$value2 = 2;
Remmembering that the SELECT is dynamic so I need also to check how
many labels and values there are and store them into variables. I
getting a really hard time doing this.
I thank any imput you guys can give me.
Thanx,
Rodrigo