What are some potential pitfalls when using wget with PHP to download files from one server to another?

One potential pitfall when using wget with PHP to download files from one server to another is that the file permissions may not be preserved during the transfer. To solve this issue, you can use the `chmod` function in PHP to set the correct permissions after downloading the file.

// Download file using wget
exec('wget http://example.com/file.zip');

// Set correct file permissions
chmod('file.zip', 0644);