PHP 8.4.6 Released!

示例

目录

添加备注

用户贡献的备注 1 note

up
119
cmnajs at gmail dot com
16 years ago
Following code returns the curl output as a string.

<?php
/ create curl resource
$ch = curl_init();

/ set url
curl_setopt($ch, CURLOPT_URL, "example.com");

/return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

/ $output contains the output string
$output = curl_exec($ch);

/ close curl resource to free up system resources
curl_close($ch);
?>
To Top

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant