Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
TYPO3 4.3 Multimedia Cookbook

You're reading from   TYPO3 4.3 Multimedia Cookbook Over 50 great recipes for effectively managing multimedia content to create an organized web site in TYPO3

Arrow left icon
Product type Paperback
Published in Feb 2010
Publisher Packt
ISBN-13 9781847198488
Length 228 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Toc

Table of Contents (13) Chapters Close

TYPO3 4.3 Multimedia Cookbook
Credits
About the Author
About the Reviewers
1. Preface
1. Getting Started 2. Managing Digital Assets FREE CHAPTER 3. Operating with Metadata in Media Files 4. Rendering Images 5. Rendering Video and Audio 6. Connecting to External APIs 7. Creating Services 8. Automating Processes

Adding FTP access to the media repository


In the next few recipes, we will cover some FTP-related tasks, starting with the basic job of downloading files through FTP. This procedure can be used to synchronize files from a remote location with your website.

In this recipe, we will connect to ftp.software.ibm.com, which allowed anonymous access at the time of writing, and download the annual report.

Getting ready

Make sure PHP is configured with FTP support. If you go to the Install Tool module phpinfo(), you should see this output:

We will assume all directory paths exist—so if they don't, either change the values in the code, or create the necessary local folders (specifically ibm under fileadmin).

How to do it...

Create a plug-in, module, or a CLI script with the following code:

$connection = ftp_connect('ftp.software.ibm.com');
$email = !empty($GLOBALS['BE_USER']['user']['email']) ? $GLOBALS['BE_USER']['user']['email'] : 'foo@example.org';
$login = ftp_login($connection, 'anonymous', $email)...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image