Uploading to FileSonic Using cURL

Status
Not open for further replies.
I've finished testing the code gunda kindly shared, but I have a weird experience. As I dont have php 5.3 I've measured upload speed by benchmark filesize/(end time - start time). I'm only getting around 1-2MB/s upload vs FTP @ 10-40MB/s.

Anyone know why this is?

u cannot compare ftp protocol speed with the http protocol m8,

they always depends one the codition

nice.
one question, filesonic is the unique that provides its api?
the rest also do the same?

well filesonic and wupload does provide api, but i am not sure about others
 
seems filesonic changed the way their links looks now...

any idea when a possible fix will come from this script?

been using it for some months now.. amazing script!
 
change this:
Code:
 preg_match('/F[0-9]+/', html_entity_decode($result), $match)

to this:

Code:
 preg_match('/F[a-zA-Z0-9]+/', html_entity_decode($result), $match)
 
hmm its getting the numbers ID but when i paste that link into browser file does not exist

seems the file links to download looks different


<script type="text/javascript">
uploadIdentifier = "upload_1324743438018_kqjfk1itee62ot423sj6cofpn1_78820";
data = [{"linkId":"F4364237814","statusCode":0,"filename":"file1.mp3","statusMessage":"File was successfully uploaded and assigned to the link id F4364237814"}];
if ('undefined' != (typeof top.CMApplication.Widgets.AdvancedUpload.Uploads[uploadIdentifier])) {
top.CMApplication.Widgets.AdvancedUpload.Uploads[uploadIdentifier].step = 'complete';
top.CMApplication.Widgets.AdvancedUpload.openComplete(uploadIdentifier, data);
} else {
top.CMApplication.Widgets.Upload.Progress.complete(uploadIdentifier, data);
}
</script>
 
Is there API just not working?

I use a different function but i think the output is the same.


I only get a fileID returned but when i get link info it fails. :(


File was successfully uploaded and assigned to the link id F4366079314

PHP:
file_get_contents("http://api.filesonic.com/link?method=getInfo&ids=$fileid");


PHP:
{"FSApi_Link":{"getInfo":{"response":{"links":[{"id":"4366079314","status":"NOT_AVAILABLE"}]},"status":"success"}}}{"FSApi_Link":{"getInfo":{"response":{"links":[{"id":"4366079314","status":"NOT_AVAILABLE"}]},"status":"success"}}}

PHP:
{"FSApi_Link":{"getInfo":{"response":{"links":[{"id":"4366079314","status":"NOT_AVAILABLE"}]},"status":"success"}}}{"FSApi_Link":{"getInfo":{"response":{"links":[{"id":"F4366079314","status":"NOT_AVAILABLE"}]},"status":"success"}}}
 
I think it's broken because of the new design.
Code:
preg_match('/F[0-9]+/', html_entity_decode($result), $match);
echo 'http://www.filesonic.com/file/'.str_replace('F','',$match[0]).'/'.$x;

This won't work as the new links contains an alphanumeric ID and not just an incrementing numeric ID.

Try this instead:
Code:
preg_match('/\/file\/([a-z0-9]{4,10})\//i', html_entity_decode($result), $match);
echo 'http://www.filesonic.com/file/'.$match[1].'/'.$x;
Though I didn't test it, and I don't know if there are any other problems in the original script.
 
I am still getting same error (error- couldn't open file). It's weird that curl is giving me such an error. I hope someone can look into this.
 
Status
Not open for further replies.
Back
Top