Skip to content
WJunction - Webmaster Forum

need help in filepost upload plugin

Status
Not open for further replies.
hi i dont know pregmatch but i am trying myself to do and not able to understand whats the problem please help guys.
after loggin in to filepost, trying to search upload url like:


PHP:
upload_url: 'http://fs34.filepost.com/upload_file/%3DkX-Z64mKD%7Ck%7C7gGqzQZlxk5Vz%7C5vqKvSOHUVIaesJSJWmfriAcuuRReFD7IkjC%7CeoAOfEt74BDFDHCO1UbI2hkNV4zGTaGd7j9mz6Ux5Wm3wT548uifJeNwZtP3QTzr4inOqU%7C5APxMOrNfNrgLdiQ7ul3g3QaCuDlAgKhMPNqc/',

i am trying to search this value using:

PHP:
preg_match("#upload_url: '(.*)'#", $page, $match);

its return an array in exchange of the upload url,can anyone help me plz?​
 

6 comments

if u know php and curl there is nothing else u need to learn and if i will make whole script for you, you will never learn. follow there api documentations. see FSApi_Upload how u will do it.

hints:
send curl request to link like in FSApi_Upload u first need to call this url:
PHP:
http://api.filesonic.com/upload?method=getUploadUrl&u=USER-EMAIL&p=PASSWORD

it will return u XML(or JSON) data , use preg_match or XML methods (ie SimpleXML) to extract server location, mine example with JSON:
PHP:
// $page is api response using curl
$fsouploadURL= $page->FSApi_Upload->getUploadUrl->response->url;

send post data to that server ($fsouploadURL) using curl with "files[]" field.
i.e
PHP:
                $fsopostfields = array(
                        'files[]' => "@$filelocation"
                        );
// here send $fsopostfields to $fsouploadURL and it will return u uploaded link, grab it using json or xml method.
 
Last edited:
Status
Not open for further replies.

About the author

S
Active Member · Joined
.::. Affordable & Reliable IT Services .::.
929
Messages
71
Reactions
28
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom