Sort of an automated download script - when it stops the script due to the time limit , i need to make it run a function to delete the files .
Maybe something like this :
set_time =1 ; ( kind of starts a counter when the script starts )
If $set_time = (3600) // ( when the script reaches 3600...
I thought there were already a few imghosts scripts available , even paid is ok .
Problem with coding a new one > Time consuming , need to fix bugs from time to time , may not work as expected , low security
Hey guys ,
I'm thinking about starting my own picture host but have no idea how to begin .
Need a simple script kind of like lulzimg & if possible the option to support thumbnails. ( i upload a big image & it automatically create a smaller version > thumbnail )
It will be used by me only .
Zzzz my site is loading uber slow waiting for the images to load .... Is there any way i can temporarily stop all images ( lulzimg) from trying to load .
DLE site
I'm guessing after the time limit is over , it will immediately stops the script how it is. Is there any way for it to process certain functions before that ?
Hey guys , is there any way to add a time limit to a script :
e.g : 30 minutes & if the script still hasn't completed , it stops it .
There this function but don't know how it really works :
set_time_limit ();
Hey Guys ,
Any idea how to create a filelist of a location via php with files with a specific extension :
E.g : .avi
let's say the location is "/location/folder1/"
Inside i have : Folderx , folderz , file1.avi , file2.avi , file2.rar
Now i want to create a filelist of that folder using...
Hmm the problem is on your end ...
1. Whether you are using a VPS or Shared , you are the only one reporting any such issue . If this was a network issue , everyone on that server/ip range would have reported something
2. Try pinging the ip instead of the site url
3. For VPS , check your...
Well atleast post screenshots from pingdom to support your allegations .
Been using knownsrv for months and barely any downtimes .
P.s : Downtimes can also be your fault i.e : VPS overload , turn machine off etc...
Nearly working 100% :
foreach (glob("$location*") as $thefolder) {
If (is_dir($thefolder)) {
rename($thefolder, str_replace(' ', '.', $thefolder));
$folderx = $thefolder;
break; // Breaks next loops since we only need 1
}
}
echo $folderx;
now the actual...
between you sure it will rename the folder itself or only the variable ?
Edit : tested ( it only removes the spaces in the variable , not the folder itself )
Zip hit another glitch ,
Soft2050 method is working tho giving the full filelocation .
I need to rename folderx as well , remove empty spaces e.g :
"The Folder X" > "The.Folder.X"
$folder = array();
foreach (glob("$location*") as $thefolder) {
If (is_dir($thefolder)) {...
Yep i was using the previous code , $files instead of $folder
Its working now but its giving the full location , needed the foldername only but it might be possible to use the full location as well in the script , will have to mess with it a bit
Thanks again for your help (y)
thx soft2050 but i'm getting this error :
Parse error: syntax error, unexpected T_FOREACH on line
foreach (glob("$location\*") as $thefolder) {
* tried the direct location as well path/folder/ instead of $location
@ Humour - its working tho i'm getting "...foldername"
nope , each time i run the script , a new folderx is created in that location with different name .
need a quick php code to retrieve its name .
@ l0calhost , yep + there is only 1 folder
$folderx = "foldername";
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.