1<?php
2 // create curl resource
3 $ch = curl_init();
4
5 // set url
6 curl_setopt($ch, CURLOPT_URL, "example.com");
7
8 //return the transfer as a string
9 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
10
11 // $output contains the output string
12 $output = curl_exec($ch);
13
14 // close curl resource to free up system resources
15 curl_close($ch);
16?>