This repository was archived by the owner on Dec 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Faker Image not working #1715
Labels
Comments
I use "picsum.photos" in my local env like following lines. But I think this is evil approach. public static function imageUrl($width = 640, $height = 480, $category = null, $randomize = true, $word = null, $gray = false)
{
- $baseUrl = "https://lorempixel.com/";
+ // $baseUrl = "https://lorempixel.com/";
+ $baseUrl = "https://picsum.photos/";
$url = "{$width}/{$height}/"; and $fp = fopen($filepath, 'w');
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_FILE, $fp);
+ curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$success = curl_exec($ch) && curl_getinfo($ch, CURLINFO_HTTP_CODE) === 200; |
https://lorempixel.com/ up again |
The follow location however is a good addition. Just replacing it is a bit too much where the service runs fine right? |
Duplicate of #1712. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
http://lorempixel.com/ website is down. so no images is being downloaded or grab.
The text was updated successfully, but these errors were encountered: