
Dss.Lexius
Members-
Posts
20 -
Joined
-
Last visited
Never
Everything posted by Dss.Lexius
-
Well, you could still take a similar approach. I think creating a cron job is pretty unnecessary for a task like this. You could create a file like this: someimage.php - <?phpheader('Content-type: image/png');readfile('images/' . ((date('i') % 10) + 1) . '.png');?> Then in your html for the image use: <img src="someimage.php" alt="" /> And if anyone copies the url, it will change also. i am getting the following error when trying to run that script Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@MyDomainNameHere.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
-
Thanks Paul, because i am new to PHP, i want to know how do i use it. should i copy this script and save as current.png (i mean PHP code but PNG ext)
-
Hi, There are 10 images in a folder called "Images". All images are named like 1.jpg, 2.jpg, 3.gif, 4.png, and so on... I am using these images on my website with this link: MyDomain.com/Images/1.jpg Now what i want to do is change the image every minute. from 1... to ...10 all images one by one, every minute... Link should remain same, but it should give different image every time. and if someone copies my link of image, it still gets changed every minute. i hope to get some help, better with some example code... Thanks!
-
hi, i am new to PHP, is there anyone who can tell that which is the best Form Generator of PHP? i need a very easy and good functional Program for it. i prefer freewares but a commercial one is also welcome! Thanks
-
don't you think it causes high cpu load because there 'll be many files on seconds basis.
-
Hi, So, here is the code. <?php $image_get[0] = "http://nstoia.com/grs/easyalbum/images/adrian.jpg"; $image_get[1] = "http://nstoia.com/grs/easyalbum/images/beverly.jpg"; $image_get[2] = "http://nstoia.com/grs/easyalbum/images/dog.jpg"; $image_get[3] = "http://nstoia.com/grs/easyalbum/images/group.jpg"; $image_get[4] = "http://nstoia.com/grs/easyalbum/images/kids.jpg"; $image_get[5] = "http://nstoia.com/grs/easyalbum/images/kenny.jpg"; $count = count($image_get); $i=0; while($i<$count) { $image_save = substr(strrchr($image_get[$i], "/"), 1); $image = file_get_contents($image_get[$i]); $f = fopen($image_save,'w+'); fwrite($f,$image); fclose($f); $i++; } ?> i got this code from this forum, credits to original author. using this code we can download some image files and save them on the server. but i want to edit something in it. i want images to be saved with different name (Always some random characters) For example these images should be saved as A911.jpg 5ctc.jpg xxx7.gif This is just a example ^ First i was using a computer program written by me, but now to automate and make my work easy i want to use online server. on my computer i used the following function to get random chracters: Func __GetRandomChars($p_sLen = 4) Local $L_sRand = "" For $l_ia = 0 To ($p_sLen -1) Switch( Random(0 , 1 , 1 ) ) Case 1 $L_sRand &= Chr(Random(Asc("a"), Asc("f"), 1)) Case 0 $L_sRand &= Random(0, 9, 1) EndSwitch Next Return $L_sRand EndFunc and then downloaded and saved the file using this piece of code: InetGet($file01, $destination & "\" & __GetRandomChars() & ".gif", 1, 1) but for making my work more easy, fast and automated, i want everything to be done on a online server. for this plz help me... Thanx
-
Guys i am new to PHP, but i know another language. in that language this code 'll do what i want: $var = Ping("www.google.com", 250) If $var Or @error = 0 Then Msgbox(0,"Status","Online, roundtrip was:" & $var) Else Msgbox(0,"Status","Offline, An error occured with number: " & @error) EndIf But i don't know how to do it in PHP. Anyone plz help with this, Thanx
-
hi, currently i am using Notepad++ which is also freeware but it's not a good one. it can not organize the code properly, so i need some better program. which can highlight the syntax and show the code in right way! Thanx
-
can you please provide a piece of code which contains multiple loops in one single loop? Just for Example...
-
does it use too much RAM/Processor usage?
-
hi, how do i get online or offline status of a server? Like we use Ping on our computer. Thanx
-
Hi, can i use multiple loops in a while loop? any example f doing this? Thanx
-
Hi, what i wanted to do is Write a Line on main page in a loop. The line 'll contain the number of line, i mean how many times it has been running with local server time and date. For example: $x = true; While $x { write a line with the date, time and count of itself in loop and append at the end of line. } i hope u got what i am asking for... Thanx
-
Download some images from link to local server
Dss.Lexius replied to Dss.Lexius's topic in PHP Coding Help
Well, Thank you so much. This problem has been solved. -
Download some images from link to local server
Dss.Lexius replied to Dss.Lexius's topic in PHP Coding Help
why it takes too long to download only 5 images? can't it be fast? -
Download some images from link to local server
Dss.Lexius replied to Dss.Lexius's topic in PHP Coding Help
can you modify this to download multiple images using variables <?php $image_get = "http://www.39dollarglasses.com/store/images/thumb/2164_Brown.jpg"; $image_save = "some_name.jpg"; $i = file_get_contents($image_get); $f = fopen($image_save,'w+'); fwrite($f,$i); fclose($f); ?> something like this $image_get[0] = "http://www.site.com/store/images/1_a.jpg"; $image_get[1] = "http://www.site.com/store/images/2_b.jpg"; and then save them with their original name as got from download link. ? -
Hi, i am just new to PHP and need some help. i hope i 'll get. actually, i want to automate my work. there are some images hosted on a server (around 10 images) i have their links. i want to download those images (*.jpg & *.gif files) to my local server in some directory! can anyone help me? Thanks!