• Network Status
  • Knowledge Base
  • Homepage
  • support@blazingcdn.com
  • Network Status
  • Knowledge Base
  • Homepage
  • support@blazingcdn.com

BlazingCDN – storage integration using PHP FTP

180 views 0

Written by Grzegorz Wiosna-Zieliński
January 19, 2021

You have storage at BlazingCDN. You want to upload the selected file to a public directory on a CDN. To integrate, you need to find the following items:

  • Server host name – xyz.com
    php-ftp-1
  • Username – XYZ
  • Password – XXX
  • FTP – ZZZ
    php-ftp-2

Then enter the code below:

<? php
$ ftp_server = “xyz.com”;
$ ftp_user_name = “XYZ”;
$ ftp_user_pass = “XXX”;
$ file = “sample.file.name”;
$ remote_file = “public / sample.file.name”;

 

// set up basic connection
$ conn_id = ftp_connect ($ ftp_server);
// login with username and password
$ login_result = ftp_login ($ conn_id, $ ftp_user_name, $ ftp_user_pass);
// upload a file
if (ftp_put ($ conn_id, $ remote_file, $ file, FTP_ASCII))

{

     echo “successfully uploaded $ file \ n”;

     exit;

}

else

{

     echo “There was a problem while uploading $ file \ n”;

     exit;

}

 

// close the connection
ftp_close ($ conn_id);
?>

See also:

BlazingCDN – upgrade your storage
BlazingCDN – Storage API documentation
BlazingCDN – logs storage
BlazingCDN – custom HTTP headers
BlazingCDN – Create a storage
BlazingCDN – access to storage
BlazingCDN – backups

Was this helpful?

Yes  1 No
Leave A Comment Cancel reply

Storage

  • BlazingCDN – storage integration using PHP FTP
  • BlazingCDN – backups
  • BlazingCDN – Storage API documentation
  • BlazingCDN – custom HTTP headers
  • BlazingCDN – logs storage
  • BlazingCDN – upgrade your storage
View All 8  

Popular Articles

  • How to create account on BlazingCDN?
  • How do I pay for BlazingCDN service?
  • BlazingCDN integration with WordPress
  • How to add new Pull zone?
  • What is Anycast CDN?

KB Categories

  • Account Settings
  • API
  • Billing
  • CDN Static
  • Copyright & Legal
  • Get Started
  • Integrations
  • Other
  • Storage
  • Tools
  • Privacy Policy
  • Terms of Use
  • © 2022 BlazingCDN. All Rights Reserved.

Popular Search:Getting Started