0

I am looking for some guidance.

I already have a PHP script that parses dozens of XML files and returns all of the urls from 10 different websites.

What I want to do is the following:

Non-technical user clicks on a button and then a script will go through roughly 500 webpages to check whether or not a specific class exists within the HTML of those pages. If the class exists, then the script would return the url of each page.

Does an API exist for this or do I need to code it from scratch?

What do you recommend? PHP or JQuery?

Al Foиce ѫ
  • 4,195
  • 12
  • 39
  • 49
Obi-Wan
  • 101
  • 1
  • 8
  • 1
    Checking whether a class exists in an HTML page is just a matter of using some regex. I don't understand what is the issue here? – Yasser Hussain Oct 09 '16 at 19:08

1 Answers1

0

What is your actual problem why you need to pick class of css ??

Otherwise as per your requirement you have you use php to make the call and get data from the url (for this look here How do I get the HTML code of a web page in PHP? ) and after getting the content you have to use jquery to check if that particular class exixts in that html code (Check if div with certain class name exists).

I don't think there is an api for that as I don't know your exact purpose.

Community
  • 1
  • 1
smarttechy
  • 852
  • 1
  • 9
  • 23