Im making a dashboard for myself in php to automate tasks that i have to do over several websites, some of the sites have api's which is great, but others dont so i was wandering if theres a way i get my code to submit order forms and other actions on sites, when instructed.
As an example - i would have a list of books (which would be linked to their urls in amazon) in my dashboard, i could then click a check button on the ones i wanted, then click buy in my dashboard. This would then on amazons site, select the books, and go through the check out and order process.
I suppose its not a million miles away from a 'spam' script the sort that submits comments on blogs. As far as automated interactions with other sites.
Im newish to php, and haven't really an idea were to start with somthing like this, could someone point me in the right direction ?
The system is simple. Map out all the calls that your browsers do to get to a page (including cookies, headers etc). When you have all of them - automate them!
The automation tool you're after is a library called cURL. It's PHP, and it allows the script to perform requests to other servers. This will allow you to pretty much do anything you like, and also to parse the replies (through tools like DOMDocument or SimpleHTML).
Instead of repeating myself, I'll link to another answer where I wrote a complete parser for someone: https://stackoverflow.com/a/16144603/2167834 . This should show you a way to get data and perform requests. From there, it's a simple case of chaining requests together.
Note, however, that your script is limited by the execution time of PHP (default 30s).