| Pages: [1] :: one page |
| Author |
Thread Statistics | Show CCP posts - 0 post(s) |

Solus Argum
Minmatar Pator Tech School
|
Posted - 2010.07.30 10:28:00 -
[1]
I'm trying to use this script to get my server to download single files(not torrents) from eve-files. But it comes back with it not being able to read the file size... I tested trying to download a file from apple, and it was able to detect the filesize, but it dosn't download the file...
Anyone have any ideas how to make this script work?
http://pastebin.com/u4TQuTRz ---- Solus Argum Lonetrek Web Services
|

Lutz Major
Austriae Est Imperare Orbi Universo
|
Posted - 2010.07.30 11:28:00 -
[2]
Howdy. Sorry, can't help you with PHP, but not all servers return the file size in the header. Pretty sh!tty, but unfortunately it is so.
Try to rework your script to read from the request until EOF. Maybe you find something similar on the web.
|

Tonto Auri
Vhero' Multipurpose Corp
|
Posted - 2010.07.30 11:35:00 -
[3]
Before using foreign classes, make sure you know how do they work. Go read http://ru2.php.net/curl -- Thanks CCP for cu |

Catari Taga
Centre Of Attention Middle of Nowhere
|
Posted - 2010.07.30 11:48:00 -
[4]
Edited by: Catari Taga on 30/07/2010 11:52:30
Originally by: Solus Argum I'm trying to use this script to get my server to download single files(not torrents) from eve-files. But it comes back with it not being able to read the file size... I tested trying to download a file from apple, and it was able to detect the filesize, but it dosn't download the file...
Anyone have any ideas how to make this script work?
http://pastebin.com/u4TQuTRz
EVE-files sends a proper Content-Length header so the issue is with your code, but since you only linked some code calling unknown classes noone can help you with that. Also you did not even tell us why you need the file size in the first place. Some basic code to retrieve the size of your signature with php and cURL:
$url = 'http://go-dl.eve-files.com/media/corp/anmith88/sig.jpg'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_NOBODY, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); echo 'Content-Length: ' . curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD); curl_close($ch);
--
Originally by: CCP the data does not seem to support that polished quality sells better than new features
|

Solus Argum
Minmatar Pator Tech School
|
Posted - 2010.07.30 18:32:00 -
[5]
Originally by: Catari Taga Edited by: Catari Taga on 30/07/2010 11:52:30
Originally by: Solus Argum I'm trying to use this script to get my server to download single files(not torrents) from eve-files. But it comes back with it not being able to read the file size... I tested trying to download a file from apple, and it was able to detect the filesize, but it dosn't download the file...
Anyone have any ideas how to make this script work?
http://pastebin.com/u4TQuTRz
EVE-files sends a proper Content-Length header so the issue is with your code, but since you only linked some code calling unknown classes noone can help you with that. Also you did not even tell us why you need the file size in the first place. Some basic code to retrieve the size of your signature with php and cURL:
$url = 'http://go-dl.eve-files.com/media/corp/anmith88/sig.jpg'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_NOBODY, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); echo 'Content-Length: ' . curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD); curl_close($ch);
I need the file size because I have a limit on the files size that can be added to my server. So before the user can upload the file to mine from Eve-Files the script needs to confirm that it is within the files size limit of 2GB.
I can post the classes if that would help. Ill go post them. ---- Solus Argum Lonetrek Web Services
|
| |
|
| Pages: [1] :: one page |
| First page | Previous page | Next page | Last page |