So i've never worked with PHP or http posting or anything before, so please excuse me if i'm asking something dumb.
Heres a site so I can explain more accurately what I need.
http://nycserv.nyc.gov/NYCServWeb/NYCSERVMain
So I want to write something that will go to that site, go to the resultant page as if I had hit "go" n开发者_JS百科ext to where it says business tax, then enter in data into the text box on the new page and hit search, and finally get the data from the resulting page.
Having no idea how to do this and after googling for several hours with no luck, I think I should be doing HTTP posting. I've seen that using PHP and CURl seems to work well, but I still don't know exactly how I should be doing this. Any help would be greatly appreciated.
Make a form that copies one of theirs. For example:
<form action="http://nycserv.nyc.gov/NYCServWeb/NYCSERVMain" method="POST"><input type="text" name="searchticket"/><input type="submit" value="submit"/></form>
Save that as .html and then open it with a browser. Type a valid number into the text field (one that actually exists), submit it, and see if it takes you directly to a results page. Then you will know whether you can post to NYCSERVMain. If you can do that, I don't see why you couldn't do it with pHp if you really need to. Follow these instructions on how to post with php.
Well what's happening with the example you mentioned is each of those drop downs and [GO] button is in a separate form.
I believe you should follow this tutorial from Tizag.
They have lots of good basic HTMl tutorials as well as HTML + PHP tutorials that will be able to help you learn how to to what it is you are trying to do.
Good Luck!
精彩评论