The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Upload image via url
Hi I was wondering if someone could help with this. I have been looking some code I can use to upload images via urls. But I cant seem to find it anywhere and I tryed making one but cant get it to work. Does anyone know how to do this or know where I can find example?
|
#2
|
|||
|
|||
I too wanna know about this !
|
#3
|
||||
|
||||
|
#4
|
|||
|
|||
Very interesting.. So I tried it out and seems to work fine. I was wondering though say I already have an upload script and would just like to incorporate it with mine. I dont know much about classes.
But say I wanted to save the file to a temp buffer and then pass it to this script. HTML Code:
// get variables for fields on upload screen $thefile = $_FILES['thefile']; $tos = $_POST['tos']; $currentip = $_SERVER['REMOTE_ADDR']; $messages = ""; How would I send it there. I have tried with normal php setting an else and array. But its not working im wondering if its the class? If so could you help me? I would greatly appreciate it Ok so this is the acctual function used to transload? HTML Code:
/** * Transloads a file from another host to the upload directory. * * @return boolean */ function transload() { if (ini_get('allow_url_fopen') == 0) { $this->set_error($this->default_errors[15]); return false; } if (!$this->is_valid_upload_path()) { return false; } if (!empty($this->transload)) { $filename = basename($this->transload); $contents = ''; if (!$this->is_valid_file($filename, false)) { return false; } set_time_limit(0); @ini_set('user_agent', 'PHP'); if (!($fp = @fopen($this->transload, 'rb'))) { $this->set_error($this->default_errors[14]); return false; } while (!feof($fp)) { $contents .= fread($fp, 8192); if ($this->max_size AND (strlen($contents) > $this->max_size)) { $this->set_error(sprintf($this->default_errors[9], $this->max_size)); return false; } } fclose($fp); if ($upload = @fopen($this->upload_path . $this->subdir . $this->rand_name($filename), 'w')) { fwrite($upload, $contents); fclose($upload); } $this->uploaded_files[] = $filename; return true; } } $thefile So It loads into my already setup script? I am trying to understand it but..It seems like different than what im used to. Any help would be appreciated |
#5
|
|||
|
|||
No one can help me with this?
|
#6
|
|||
|
|||
Hmm, I'm having a big headache with this problem, who can help me???
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|