如何在PHP中实时制作For Loop [英] How to make For Loop Real Time in PHP

查看:256
本文介绍了如何在PHP中实时制作For Loop的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想制作一个实时显示结果的脚本.

I want to Make a Script which give result realtime .

在我的脚本"中,该过程包含3个步骤.

In My Script it have 3 steps .

第一步是从网页上获取所有链接.(我使用pregmatch_all函数,因为我需要的所有链接都是从同一个域开始的 http://example.com/docs/ *,然后从 http://test.com/page抓取/ *)

1st step was to grab all links from a webpage .(i use pregmatch_all function coz all links i need are started with same domain http://example.com/docs/* and grab from http://test.com/page/* )

第二步,我必须从所有链接中获取直接链接(例如htp://files.example.com/files/* http://example.com/docs/ *)

2nd step i have to grab direct link from all links (like htp://files.example.com/files/* from http://example.com/docs/* )

第三步,将该文件上传到第三方站点,并从那里获取上传链接.

3rd step Upload that file to and third party site and get the upload link from there .

最后,我添加了一个名为的函数,该函数获取页面范围(例如'1 | 5'),因此脚本从 http://test.com /page/5/.

lastly i added a function named which get the page ranges (like '1|5' ) so script upload all links from http://test.com/page/1/ to http://test.com/page/5/ .

我已经完成了它的运行,但是它显示了所有完成后的结果,但是我想要一个实时结果,例如脚本已经获取了一个链接并执行了所有步骤,并在浏览器上显示了结果链接,然后依此类推表示实时解决方案.

I have done the scipt it was alo running ok but it shows result after all completed but i want a realtime result like script have grabed one link and do all steps with it and show that reult link on browser and then so on i mean a realtime solution .

我该怎么做,但没有实时结果.

How can i do that i used for loop but no real time result .

推荐答案

Flush()将为您提供帮助

这篇关于如何在PHP中实时制作For Loop的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆