Can anybody help me to write a function which get a random file from the id of an album? (include function to connect to db)
Example:
function get_random($album_id){
....
}
Thank you very much!
Quote from: levy on March 21, 2007, 03:24:24 AM
Can anybody help me to write a function which get a random file from the id of an album? (include function to connect to db)
Example:
function get_random($album_id){
....
}
Thank you very much!
This are is for CpmFetch - which does what you want... without needing to write a function.
http://cpmfetch.fistfullofcode.com
Otherwise, you are in the wrong forum.
I need only a function to get only 1 file. cpmFetch is so complex, i cannot get 1 random file from an album by cpmFetch.
If you don't have a question on cpmFetch but want to come up with a custom script then you're on the wrong sub-board. You shouldn't have posted here in the first place.
If you need that particular function, then just write the code - don't expect to be spoon-fed. If you can't code, then use cpmFetch. That's all we could say.
Quote from: levy on March 21, 2007, 05:56:46 AM
I need only a function to get only 1 file. cpmFetch is so complex, i cannot get 1 random file from an album by cpmFetch.
Yes cpmfetch can give you one image
You say its too complex, but you come here asking for someone to write the code for you?? *beep* is CpmFetch??
The code written for you. That's what it is.
I absolutely guarantee you, using cpmfetch will take less lines of code that coding it yourself. Or anyone else coding it for you.