假设我有一个带有登录表单的网站(称为s1 ..?).成功登录网站后,您会看到一个页面,其中包含一些状态信息,例如:Ticket Closed.自从... 然后,ai在需要访问s1的另一台服务器上有一个页面,登录我,然后在票证关闭的情况下获取日期...
我真的不需要所有脚本,因为我认为我可以弄清楚它,但是我不知道如何制作第一部分,将网页连接到s1网页上,从而无法获取数据?
感谢任何帮助人员!
解决方案您可以使用卷曲(链接有一个例子)或 fopen (请参阅示例部分).
请注意,使用fopen要求 allow_url_fopen 设置启用,而curl要求启用curl模块.
Let say i have a website (called s1..?) with a login form. After you succesfully log on the website, you have a page with some status infos like : Ticket Closed. since... And then ai have a page, on another server that need to go on s1, log me in and then retreive the date if the ticket is closed...
I dont really need all of the script since i think i can figure it out, but i wonder how do i make the first part, connecting the webpage onto the s1 webpage so ill be able to fetch data?
Thanks for any help guys!
解决方案You can use either curl (link has an example) or fopen (see the examples section).
Note that using fopen requires that the allow_url_fopen setting to be enabled, while curl requires the curl module to be enabled.
更多推荐
使用PHP连接到外部网站
发布评论