[RSS Feed/News] Inserting avatar via URL image

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
My repository:
PHP:

Code:
<?php
namespace XF\Repository;
use \XF\Mvc\Entity\Repository;
use XF\PrintableException;

class UserNFT extends Repository
{
    protected $finder,$entity;

    public function getImageData(string $imageUrl)
    {
        $ch = curl_init();
        curl_setopt($ch,CURLOPT_URL,$imageUrl);
        curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
        $data = curl_exec($ch);
        curl_close($ch);
        $response = json_decode($data,true);
        return $response;
    }...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom