Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

simple php curl

<?php
 
// From URL to get webpage contents
$url = "https://www.geeksforgeeks.org/";
 
// Initialize a CURL session.
$ch = curl_init();
 
// Return Page contents.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 
// Grab URL and pass it to the variable
curl_setopt($ch, CURLOPT_URL, $url);
 
$result = curl_exec($ch);
 
echo $result;
 
?>
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #simple #php #curl
ADD COMMENT
Topic
Name
6+8 =