Вопрос

I looked at the SO question search script which find web page in website stored in database but the answer provided specific API's which would not make the program very generic. I am trying to write a script that will search a website using the website's search field, then click on an item on the website if a condition is met. I have no idea where to start with this and the only question relevant did not have the answer I was looking for. I'm not even sure whether PHP is a suitable language for the task. Maybe Python?

Это было полезно?

Решение

PHP is a suitable language. If you're trying to search for a term in a database, then MySQLi or PDO is your best option. Sanitise the search term, bind to the query and fetch the relevant result(s).

Do what as you would with the returned result set.

If I understood correctly, is this basically what you're asking?

Другие советы

Ruby's Mechanize is brilliant for performing web actions in an automated sense - http://mechanize.rubyforge.org/EXAMPLES_rdoc.html.

It's very powerful whilst being quick to learn and use.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top