Skip to content

Commit

Permalink
switch from file get content to curl for aviary embed
Browse files Browse the repository at this point in the history
  • Loading branch information
smntb committed Aug 28, 2024
1 parent b6d497f commit b36406c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/Ohms/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ class Utils {
* @return string
*/
public static function getAviaryUrl($embed) {

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $embed);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// Create DOM from URL or file
$content = file_get_html($embed);
$content = str_get_html($response);
$mediaURL = "";
if ($content != "") {

Expand Down

0 comments on commit b36406c

Please sign in to comment.