简体   繁体   English

PHP简单html dom解析器-简单脚本

[英]PHP simple html dom Parser - Simple Script

I need some help for creating a simple script that check on other site. 我需要一些帮助来创建在其他站点上检查的简单脚本。

Example: I have index.php and an input form like this. 示例:我有index.php和这样的输入形式。

<form method="post">
    <input type="text" name="cf" placeholder="Codice Fiscale"/>
    <input type="submit" value="Submit">
</form>

and index2.php where I need to get and show validation or error not found where URL will be index2.php?cf=FFFFF21243F1234F354F index2.php ,我需要获取并显示验证或找不到错误,而URL将会是index2.php?cf=FFFFF21243F1234F354F

other URL where I need to check is: http://www.nonsolocap.it/codice-fiscale/controllo/?cf=FFFFF21243F1234F354F (this url shows Error cuz this CF does exist) 我需要检查的其他URL是: http ://www.nonsolocap.it/codice-fiscale/controllo/?cf=FFFFF21243F1234F354F(此URL显示Error cuz这个CF确实存在)

I didn't understand your question But well. 我不明白你的问题,但是很好。

action="some site.php"

in

<form>

Explain more--.. 解释更多 - ..

As far as I can understand you are trying to get data on another url with parameter CF and then that other url will do validation using CF value 据我了解,您正在尝试使用参数CF在另一个网址上获取数据,然后该其他网址将使用CF值进行验证

ok to do that 好的

<form method="GET" action="http://yourwebsitename.php">
    <input type="text" name="cf" placeholder="Codice Fiscale"/>
    <input type="submit" value="Submit">
</form>

Now when you click submit then your url will look like http://yourwebsitename.php?cf=value-enterd-on-the-form 现在,当您单击提交时,您的网址将看起来像http://yourwebsitename.php?cf = value-enterd-on-the-form

now on the other website where you want to do validation get CF paremeter using 现在在您要进行验证的其他网站上使用CF参数

$cf = GET['cf'];

now do whatever you want to do with $cf 现在用$ cf做任何你想做的事

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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