|
Posted by d on 09/27/90 11:37
"charliefortune" <google@charliefortune.com> wrote in message
news:1137506279.617801.311270@f14g2000cwb.googlegroups.com...
> Here is an example of one of the pages of a sold out item
>
> http://www.subsidesports.com/uk/store/product_details.jsp?pid=72057594037941652&cid=402&brc=&red=product_list.jsp?id=402,http://www.subsidesports.com/uk/store/product_details.jsp?pid=72057594037941652&cid=402&brc=&red=product_list.jsp?id=402,
>
> and here is an in-stock one
>
> http://www.subsidesports.com/uk/store/product_details.jsp?pid=72057594037941998&cid=402&brc=&red=product_list.jsp?id=402,
>
> Looking through, it seems that the javaScript array element
> productPrice[0] contains the information I need, so I suppose the
> sensible thing would be to look at this alone to decide if an item is
> in stock. I think it is null if the product is available. So my
> question now becomes ....
>
> how can I test the value of this variable using PHP on the retrieved
> document ? Surely not looking for the regex
>
> thanks
> productPrice[0] = 'SOLD OUT' ?
Why don't you check to see if this text is in the document or not:
<span style="font-size:20px; color:#000000;">SOLD OUT </span>
Surely that'll tell you if it's sold out or not, regardless of javascript.
You don't even have to strip any tags before checking for it... :)
Navigation:
[Reply to this message]
|