Title: Random picture
Last modified: August 19, 2016

---

# Random picture

 *  Resolved [pathfinder](https://wordpress.org/support/users/pathfinder/)
 * (@pathfinder)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/random-picture/)
 * I want to include a random picture from my gallery. A user here showed the code
   as
    <?php include(‘[http://www.mydomain.com/gallery/block-random.php&#8217](http://www.mydomain.com/gallery/block-random.php&#8217););?
   > This worked until my host turned off the include urls. My gallery is a sub 
   of my main and I can’t seem to get the relative path correct. I have tried everything
   my little brain can think of and still no luck. I tried ../../../ ad naseum. 
   I tried using wpurl and then I still get “URL file-access is disabled in the 
   server configuration” hELP

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [marjiec](https://wordpress.org/support/users/marjiec/)
 * (@marjiec)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/random-picture/#post-701866)
 * [This works for me](http://ma.tt/scripts/randomimage/)
 *  Thread Starter [pathfinder](https://wordpress.org/support/users/pathfinder/)
 * (@pathfinder)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/random-picture/#post-701868)
 * Mark resolved. I was able to use cURL

Viewing 2 replies - 1 through 2 (of 2 total)

 The topic ‘Random picture’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [pathfinder](https://wordpress.org/support/users/pathfinder/)
 * Last activity: [18 years, 6 months ago](https://wordpress.org/support/topic/random-picture/#post-701868)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
