如何将表单中的变量插入 file_get_contents("link+formdata")
通过表单提交的变量,包含句号、数字、字母
示例:danny.29 将替换以下链接中的 HERE:
file_get_contents(" http://userapi.website.com/HERE ");
如您所见,我对此很陌生,非常感谢您提供任何帮助:)
索引.html
<html>
<body>
<form action="add.php" method="post">
ID: <input type="text" name="add">
<input type="submit">
</form>
</body>
</html>
添加.php
<html>
<body>
<?php $x=$_POST['add'];?>
<?php
echo file_get_contents("http://userapi.website.com/"echo $x;");
?>
<?php echo $_POST["file_get_contents"]; ?>
</body>
</html>