I have in PHP a script that use multi curl to connect to sites doing the following actions:
- login to the site
- get a page
- verify the page content
- if the content is what I need I do 5.
- post some data to the site.
- log out.
My script can login to <20 sites in parallel, but is not too fast and is use a lot of server resources.
Can I convert the script to Python or other language to make it faster? I don't know if is possible to use a browser like firefox or other to send commands and get the content? Example:
system("firefox http://stackoverflow.com/users/login");
system("firefox post-data:username=stack&password=some");
system("firefox getcontent > mypage.html");
It may looks a crazy solution :) but I need to improve the performance of PHP script.
Thank you very much, Adrian