|
Posted by Jerry Stuckle on 10/15/07 10:17
Captain Paralytic wrote:
> On 15 Oct, 03:37, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> OK, I give up here. I am DEFINITELY not a Regex expert, and have been
>> working on this for hours with no luck.
>>
>> Basically I need to parse a page for certain information which will be
>> fed back into CURL to post to a site. I need to find four types of tags
>> on the page:
>>
>> <input type=hidden name=a1 value=b1>
>> <input type=text name=a2>
>> <input type=submit name=a3 value=b3>
>> <select name=a4>
>>
>> I don't need any other tags.
>>
>> From the hidden and submit types, I need name and value. From the text
>> and select types, I just need the name.
>>
>> I can assume the attributes will always show up in this order, but there
>> may be other things between the < and > delimiters. Additionally, the
>> actual type and name may have single or double quotes around them, or
>> neither.
>>
>> Does anyone have some code for this? It doesn't have to be all one regex.
>>
>> TIA.
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================
>
> Could you use the php dom functionality for this?
>
> Wouldn't it be good if php had the equivalent of
> getElementsByTagName()!
>
>
Hi, Paul,
How I wish I could - it was the first thing I tried. However, this page
is not well formed html, and DOM throws up all over it.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|