首页 >后端开发 >php教程 >php curl get

php curl get

WBOY
WBOY原创
2016-07-29 09:06:221038浏览

<code><span>private</span><span><span>function</span><span>geturl</span><span>(<span>$url</span>)</span> {</span><span>$ch</span> = curl_init();
        <span>$timeout</span> = <span>5</span>;
        curl_setopt(<span>$ch</span>, CURLOPT_URL, <span>$url</span>);
        curl_setopt(<span>$ch</span>, CURLOPT_RETURNTRANSFER, <span>1</span>);
        curl_setopt(<span>$ch</span>, CURLOPT_CONNECTTIMEOUT, <span>$timeout</span>);
        <span>$file_contents</span> = curl_exec(<span>$ch</span>);
        curl_close(<span>$ch</span>);
        <span>return</span><span>$file_contents</span>;
    }</code>
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

以上就介绍了php curl get,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn