hackalive
Members-
Posts
652 -
Joined
-
Last visited
Everything posted by hackalive
-
Hi guys I am looking for a loop which will run untill there is a difference of 10 minutes. The timestamp I wish to use is "ISO 8601 date (added in PHP 5)" [ date("c")] If anyone know some code for this it would be much appreicated. I can do the loop its just the comparison between the two timestamps as part of the loop I have no idea where to start on. Cheers, and thanks in advance.
-
This is now preventing it from extracting untill the function is run, I need something that detects a completed extraction then runs the function.
-
Looking here: http://articles.sitepoint.com/article/watermark-images-php If you got the image dimensions (http://php.net/manual/en/function.getimagesize.php) and then used the formula: percentage(as a decimal)/imageheight = $y ........ e.g. 0.5/1000 = 500 percentage(as a decimal)/imagewidth = $x ........ e.g. 0.5/1000 = 500 then apparently $watermark_width = imagesx($watermark); $watermark_height = imagesy($watermark); places the watermark over the whole image ... so just adjust $watermark to refelt $x or $y. Give that ago, without watermark_wrapper.php (all the code) I cant test it for you, if you send all the code I can test this out and get it working for you.
-
Okay I now have a working extract ZIP archive script. What I am now looking to do is have a loop which checks the percentage complete the extraction is and at 100% (with no erros) carry out a PHP function. The code so far is (and includes comments on how the new function would be placed): $dir = opendir('temp'); while(false !==($file=readdir($dir))){ if(strpos($file, '.zip',1)){ extractupdate($file); } } function extractupdate($file){ $zip=new ZipArchive; if($zip->open('temp/'.$file) == TRUE){ $update=rtrim($file, ".zip"); $zip->extractTo($_SERVER['DOCUMENT_ROOT']."/update/temp/$update"); $zip->close(); echo "Extraction started."; // Place loop here to run untill 100% extraction completed and then run function "intsallupdate($update);" } else { echo "Failed to start extraction."; } } function installupdate($update){ // installupdate() will now shift the files around as necessary. // NB to PHPFREAKS, no assistance with code for installupdate() is required, only the loop. Cheers. } Many thanks in advance.
-
Thanks thorpe, I have now done that. So this is the "topology" of the code/files: root/index.php $dir = opendir ("temp"); while (false !== ($file = readdir($dir))) { if (strpos($file, '.zip',1)) { extractupdate($file); } } function extractupdate($file){ $zip = zip_open("$file"); if ($zip){ while ($zip_entry = zip_read($zip)){ $update = rtrim($file, ".zip"); $fp = fopen("zip/".zip_entry_name($zip_entry), "w"); if(zip_entry_open($zip, $zip_entry, "r")){ $buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry)); fwrite($fp,"$buf"); zip_entry_close($zip_entry); fclose($fp); } } zip_close($zip); } } in root/temp/ there is a file 001.zip the code is failing to extract to root/temp/zip/ Any help is much appreciated, thanks. PS My aim is to extract the contents of the zip archive to the folder root/temp/zip/ Cheers
-
Hi guys, I have some code for xtracting the contets of a zip file to a folder. Now this is the code: function extractupdate($file){ $zip = zip_opne("$file"); if(is_resource($zip)){ while ($zip_entry = zip_read($zip)){ $fp = fopen("zip/".zip_entry_name($zip_entry), "w"); if(zip_entry_open($zip, $zip_entry, "r")){ $buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry)); fwrite($fp,"$buf"); zip_entry_close($zip_entry); fclose($fp); } } zip_close($zip); } } My question is how do I install the ZIP library into PHP. At the moment I am using PHP on Windows and using Apache, so I need a good way to add the ZIP library where I edit the php.ini etc.. Your help is much appreciated, thanks.
-
I'd be interested in this too
-
@AlexWD could you please provide a sample, especially for the loop part
-
Hi, I need some code that searches all folders in a folder tree for specific file names (eg my.php). I need to be able to echo the file name and full url (eg admin/my.php or just admin) in other worrds I need the folder locations of each copy of that file Anyone have any ideas? Thanks in advance
-
It is just the same as the sample code ont the hyperlinks posted above
-
So I am using jQuery tabs: Q1) I am using jQuery Tabs (http://jqueryui.com/demos/tabs/#sortable) and have set it up so they can be sortable, howvere the first two tabs I want to be permenant and NOT sortable, how can I achieve this? Q2) I am using jQuery Tabs (http://jqueryui.com/demos/tabs/#manipulation) with the manipulation code, my question is on Tab1 I have many hyperlinks which I want to open a new tab, the tab these hyperlinks would open would open one with information relating to that tap. How could I do this? anyideas? Thanks in advance guys
-
@Daniel0 I have been researching but still not found the answer
-
Okay, I know at the momnent I am posting here alot but I would like to get it sorted sooner rather than later. So here is what I understand I need to achieve and my problems (to start us off :-D) Task Problem Create tags such as <ha:login-button> None, they are just tags File (such as XSLT) that stores and decides how to interact with the tags How, I am clueless, what does the file even look like and how does in interact with all the extra settings (eg <ha:login-button length="long">< JavaScript Which 'makes it all work'. Again how, how can I do this, I know how to JS and presume if we resolve the above I could work on this issue
-
I am still at a loss (have no idea) how to make this all work (implement)
-
okay so if I was to use cassandra (for example) how would I organise the tables do you guys think? Thanks for the help so far
-
okay ignace yes thanks very much, but how to implemet the reparsing and this file
-
okay, i'll take a look thanks ignace
-
bump
-
I have read about XSLT and read a few tuts but still am unsure how to solve this issue, I dont knwo if XSLT is the right way about? what do you guys think+ (Please reference Reply #16, [above])
-
bump