Jump to content

Search the Community

Showing results for tags 'phpbash'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I've got this PHP script for invalidating files in the Amazon CloudFront CDN, which I want to automate. I got it from GitHub. Part of it uses XML, where the file paths are added. $xml = <<<EOD <InvalidationBatch> <Path>/index.html</Path> <Path>/blog/index.html</Path> <CallerReference>{$distribution}{$epoch}</CallerReference> </InvalidationBatch> EOD; I have no idea how to go about this, but what I want to do is change this part so that file paths are added from the output of the bash find command: find /srv/domain.com/wp-content/uploads/ -user www-data This is to invalidate new image file uploads after they have been optimised using a cron script. To further complicate matters, the path needs to only include from the wp-content directory onwards, so the XML would end up something like this: $xml = <<<EOD <InvalidationBatch> <Path>/wp-content/uploads/2014/02/ED_Wedluxe-CuveeRose-364x400.jpg</Path> <Path>/wp-content/uploads/2014/02/VALENTINE_PROMOTION_1-165x213.jpg</Path> <Path>/wp-content/uploads/2014/02/ED_Wedluxe-CuveeRose-165x220.jpg</Path> <Path>/wp-content/uploads/2014/02/ED_Wedluxe-CuveeRose-371x495.jpg</Path> <Path>/wp-content/uploads/2014/02/VALENTINE_PROMOTION_1-471x609.jpg</Path> <Path>/wp-content/uploads/2014/02/VALENTINE_PROMOTION_1.jpg</Path> <Path>/wp-content/uploads/2014/02/VALENTINES14-WEB_banner-794x4761-687x412.jpg</Path> <Path>/wp-content/uploads/2014/02/VALENTINES14-WEB_banner-794x4761-300x180.jpg</Path> <Path>/wp-content/uploads/2014/02/VALENTINES14-WEB_banner-794x4761.jpg</Path> <Path>/wp-content/uploads/2014/02/VALENTINE_PROMOTION_1-150x150.jpg</Path> <Path>/wp-content/uploads/2014/02/VALENTINES14-WEB_banner-794x4761-687x477.jpg</Path> <Path>/wp-content/uploads/2014/02/VALENTINE_PROMOTION_1-110x142.jpg</Path> <Path>/wp-content/uploads/2014/02/ED_Wedluxe-CuveeRose-500x432.jpg</Path> <Path>/wp-content/uploads/2014/02/VALENTINE_PROMOTION_1-624x432.jpg</Path> <Path>/wp-content/uploads/2014/02/VALENTINES14-WEB_banner-794x4761-471x282.jpg</Path> <Path>/wp-content/uploads/2014/02/VALENTINES14-WEB_banner-794x4761-150x150.jpg</Path> <Path>/wp-content/uploads/2014/02/VALENTINES14-WEB_banner-794x4761-364x400.jpg</Path> <Path>/wp-content/uploads/2014/02/ED_Wedluxe-CuveeRose-110x146.jpg</Path> <CallerReference>{$distribution}{$epoch}</CallerReference> </InvalidationBatch> EOD; I'd really appreciate any help on how to go about this. Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.