PHP cURL to get Website data
PHP Program:
[php]
<?php error_reporting(E_ALL ^ E_NOTICE); ?>
<form method="post" action="compare.php">
<div id="input" style="text-align: center; margin-top: 45px;">
Enter the website to Open :<input type="text" name="pname" id="pname" size="45"/>
</div>
</form>
<?php
$siteName = $_POST[‘pname’];
if($siteName){
$curl_connection = curl_init();
$url = "$siteName";
curl_setopt($curl_connection, CURLOPT_URL, $url);
curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl_connection, CURLOPT_REFERER, "https://www.registrar.usf.edu/");
$result = curl_exec($curl_connection);
echo $result;
}
?>
[/php]
Output:
Recommended Books:



ReviewsV388… always smart to read reviews before diving in. Let’s hope they’re honest and unbiased. Doing my research before I commit! Check out the reviews yourself reviewsv388.
Cwinz? New name to me. Always keen to see what these new platforms are bringing to the table. Hoping for some innovative features! Is it a win? cwinz