mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-17 20:54:21 +00:00
Clean up
This commit is contained in:
@@ -21,7 +21,7 @@ foreach ($curl->getOptions() as $option => $value) {
|
||||
// CURLOPT_REDIR_PROTOCOLS: 3 (CURLPROTO_HTTP | CURLPROTO_HTTPS)
|
||||
//
|
||||
// option 10018:
|
||||
// CURLOPT_USERAGENT: some agent
|
||||
// CURLOPT_USERAGENT: "some agent"
|
||||
//
|
||||
// option 13:
|
||||
// CURLOPT_TIMEOUT: 60
|
||||
|
||||
@@ -5,7 +5,7 @@ require __DIR__ . '/../vendor/autoload.php';
|
||||
use Curl\Curl;
|
||||
|
||||
$curl = new Curl();
|
||||
$curl->get('http://backend.deviantart.com/rss.xml', [
|
||||
$curl->get('https://backend.deviantart.com/rss.xml', [
|
||||
'q' => 'boost:popular in:photography/people/fashion',
|
||||
'type' => 'deviation',
|
||||
]);
|
||||
|
||||
@@ -22,7 +22,7 @@ $curl->get('https://api.flickr.com/services/rest/', $data);
|
||||
foreach ($curl->response->photos->photo as $photo) {
|
||||
$size = 's';
|
||||
$ext = 'jpg';
|
||||
$url = 'http://farm' . $photo->farm . '.staticflickr.com/' . $photo->server . '/' .
|
||||
$url = 'https://farm' . $photo->farm . '.staticflickr.com/' . $photo->server . '/' .
|
||||
$photo->id . '_' . $photo->secret . '_' . $size . '.' . $ext;
|
||||
echo '<img alt="" src="' . $url . '" height="75" width="75" />';
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
} else {
|
||||
$user_id = $_SESSION['user_id'];
|
||||
$photo_id = $result->response->photoid;
|
||||
$photo_url = 'http://www.flickr.com/photos/' . $user_id . '/' . $photo_id;
|
||||
$photo_url = 'https://www.flickr.com/photos/' . $user_id . '/' . $photo_id;
|
||||
echo '<p>Photo uploaded successfully. <a href="' . $photo_url . '">View photo</a>.</p>';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user