Skip to content

Instantly share code, notes, and snippets.

@cupracer
Created March 20, 2018 10:00
Show Gist options
  • Save cupracer/260b7856ef20820e581fe559942ecaa3 to your computer and use it in GitHub Desktop.
Save cupracer/260b7856ef20820e581fe559942ecaa3 to your computer and use it in GitHub Desktop.
Simple PHP script to run a curl command
<?php
$url = 'https://www.google.de';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
$response = curl_exec($ch);
curl_close($ch);
var_dump($response);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment