Maison  >  Article  >  développement back-end  >  PHP怎么做到自动发送GET请求

PHP怎么做到自动发送GET请求

WBOY
WBOYoriginal
2016-06-13 11:54:391207parcourir

PHP如何做到自动发送GET请求?

<br /><?php<br /><html><br /><head><br />	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><br />	<title>PHP如何做到自动发送GET请求?</title><br /></head><br /><body><br /><br/><a href="https://127.0.0.1/aaa.htm?a=1&b=33&c=1">连接</a><br /></body><br /></html><br />?><br />


PHP文件。
如上代码中,如何做到当打开这个页面的时候,自动点击里面的“连接”并跳转。
------解决方案--------------------
直接用head location 跳转。

------解决方案--------------------
<br /><html><br /><head><br />    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><br />    <title>PHP如何做到自动发送GET请求?</title><br /></head><br /><body><br /><a id="url" href="https://127.0.0.1/aaa.htm?a=1&b=33&c=1">连接</a><br /><script type="text/javascript"><br />window.location = document.getElementById("url").href;<br /></script><br /></body><br /></html><br />

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn