문제

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