Site icon Hip-Hop Website Design and Development

How do I return a picture from a script

I’ve googled however should not be utilizing the proper phrases. I’m attempting so as to add a script to my WordPress plugin that takes a url and returns a reformatted picture. I do know that is frowned upon as hotlinking. The picture in my case is provided by an internet site imaging service.

The picture takes from 3 to five seconds to be generated. I’ve a java script that units my preview picture src tag as soon as the web site url is entered (onblur). I want a technique to obtain the complete sized picture from the service and resize it as a thumbnail (I used to be resizing it within the browser however it seems horible). I attempted accessing wordpress’s download_url() perform from my script however I get a lot of unresolved references. I’m certain I’m doing one thing improper.

My present code:

<?php
require_once('../../../wp-admin/consists of/file.php');
$im = download_url('http://www.linux.org/photographs/brand/linuxorg.gif'); 
header('content-type: picture/gif'); 
// resize and ship picture information right here...

I get again the next error:

Deadly error: Name to undefined perform __() in /homepages/5/d367772185/htdocs/rodandfly/wp-admin/consists of/file.php on line 13