简体   繁体   中英

How to send a request to public website which uses POST method and how to find out parameters of the request like source and destination etc

I want to collect data of trains for the given 'source and destination' pairs from an public website. I don't want to do this manually, but from the code and automate it. I know it uses POST method. But how do i send my input to the page? i don't know post parameters it uses! Is it possible anyway how to find this.. solutions are much appreciated.

最好的解决方案是使用他们的API,如果他们提供它,否则我将carfull未经他们的许可从网站获取信息。

Use the site like you normally would with the network tab in your browser's dev tools open. When the site makes the request, you can inspect the headers and body of the request. If they didn't release an api they probably don't want you doing this though.

You might want to try to incorporate post-receive programming similar to that used for Github webhooks for your program. Take a look here: https://github.com/aegypius/github-webhook-php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM