dongsi7067 2017-10-21 12:06
浏览 23

如何在PHP中创建例程直接链接?

Friends, I need help to create a routine (function) in php to solve the hypothetical link below. But I'm not sure where to start:

The initial link captured by preg_match_all is in the format:

http://www.exemplo.br/test.html

What you send to:

http://www.page1.br/sub/exemplo1.php?txt=texto12

In the previous link you need to click on the advertisement 3 times to have access to the ads4 (below). Only in the source code of ads4 is the direct link.

ads1 - http://ad.net/sub/exemplo1.php?txt=texto12
ads2 - http://test.in/sub/exemplo1.php?txt=texto12
ads3 - http://outro.bz/sub/exemplo1.php?txt=texto12
ads4 - http://exemplo.com/sub/exemplo1end.php?txt=texto12

Direct link available in ads4 source code:

http://www.end.com/sub/exemplo1/texto12.txt

I could convert the first link at the end, but I'm lost in how to do a routine that exits from where I am (preg_match_all link) to the text12.txt

http://www.page1.br/sub/exemplo1.php?txt=(.*?)
http://exemplo.com/sub/exemplo1end.php?txt=($1)
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 keil的map文件中Image component sizes各项意思
    • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
    • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
    • ¥15 划分vlan后,链路不通了?
    • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
    • ¥15 Vue3 大型图片数据拖动排序
    • ¥15 Centos / PETGEM
    • ¥15 划分vlan后不通了
    • ¥20 用雷电模拟器安装百达屋apk一直闪退
    • ¥15 算能科技20240506咨询(拒绝大模型回答)