Search found 13 matches

by sleepingdanny
Tue Sep 02, 2003 7:40 am
Forum: PHP coding => General
Topic: Getting users IP
Replies: 5
Views: 1321

If I know currectly - you will not be able to find the IP when
using $_SERVER, am I correct?

Anyway if you want to find out only the IP just use:
$_ENV["REMOTE_ADDR"]
by sleepingdanny
Tue Sep 02, 2003 7:33 am
Forum: PHP coding => General
Topic: Uploading problem - inserts // where / should be!
Replies: 9
Views: 2242

Post your code please
by sleepingdanny
Sun Jun 08, 2003 7:33 am
Forum: PHP coding => General
Topic: Logistical problem
Replies: 11
Views: 2474

He ment => $something[car]=dog ... Just an example :P
- Its a PHP code.
by sleepingdanny
Sun May 11, 2003 4:57 am
Forum: PHP coding => General
Topic: editing some parts of a text file?
Replies: 5
Views: 1425

Do you mean that you want a code that will allow you to change the file in a textarea :?: If so... I Can help you.
by sleepingdanny
Sun May 11, 2003 4:55 am
Forum: PHP General
Topic: http://localhost/test.php
Replies: 1
Views: 1108

Did you try to open the file from your own computer or after you uploaded to your site? (it wont work from your computer, because PHP is Server-Side language.

You can try adding this to your code :arrow:

Code: Select all

<?php
....
?>
:P
by sleepingdanny
Thu Apr 17, 2003 1:40 am
Forum: PHP coding => General
Topic: client IP address
Replies: 4
Views: 1498

You can use this code: :arrow: $file="Path To Log File"; #/home/site.com/... $fp=fopen($file,'a') or die("Couldn't Log!"); fputs($fp,"$REMOTE_ADDR\n"); fclose($fp); It will open the log file and will add the visitor IP address to it. :P If you'll do what Andrew suggested you will only see your own I...
by sleepingdanny
Fri Apr 11, 2003 4:54 am
Forum: PHP coding => General
Topic: Cookie Problem
Replies: 3
Views: 1170

Try this... <?php $bc = $backcolor; $tc = $textcolor; setcookie("backcolor", $bc, time()+3600) && setcookie("textcolor", $tc, time()+3600) && header("Location: m"); exit; ?> I never tried to work my scripts in a localhost, why don't you try uploading them first. :P And remember that the code has to ...
by sleepingdanny
Sat Mar 29, 2003 4:49 am
Forum: PHP coding => General
Topic: php links?
Replies: 1
Views: 1429

Its very easy to do :!: :arrow: Lets say your site URL is: m <? if($id=="1"){ echo "Content"; } esleif($id=="2"){ echo "Different Content"; } // ...... ?> This code should be placed in the index.php file and then you make a link to "http://www.site.com/index.php?id=1" or to "http://www.site.com/inde...
by sleepingdanny
Thu Mar 20, 2003 2:59 am
Forum: PHP coding => General
Topic: Creating FTP upload page
Replies: 8
Views: 4133

Are you talking about the code that I'v writed :?:
By the way the form and the code has to be in the same page...
Do this :arrow:

<form>
.....
</form>
<?
....
?>
by sleepingdanny
Wed Mar 19, 2003 3:30 am
Forum: PHP coding => General
Topic: Creating FTP upload page
Replies: 8
Views: 4133

I made a small mistake in the form code... its fixed now! :P
by sleepingdanny
Tue Mar 18, 2003 1:25 am
Forum: PHP coding => General
Topic: Creating FTP upload page
Replies: 8
Views: 4133

Explanation : :arrow: You can set max size for the uploaded files - 100000 = 1MB. :arrow: If the file that you want to upload is bigger then 1MB it will show an error. :arrow: You can set type of files that are not allowed to be uploaded - html,asp... :arrow: You tell the code what to do after the ...
by sleepingdanny
Mon Mar 17, 2003 6:54 am
Forum: PHP coding => General
Topic: make directory, upload file then delete (permission hell)
Replies: 0
Views: 648

:arrow: Try this maybe it will work :!: : File's Name: <input type="text" name="file"><br> Type: <select size="1" name="end"> <option value="gif">.gif</option> <option value="GIF">.GIF</option> <option value="jpg">.jpg</option> <option value="JPG">.JPG</option> ....................... </select> <? i...
by sleepingdanny
Mon Mar 17, 2003 6:44 am
Forum: PHP coding => General
Topic: Creating FTP upload page
Replies: 8
Views: 4133

Why don't you just use a regular copy process ? $source_file (Its the the uploading input) <? $path="path to directory"; $max_size=1000000; $source_file_size_kb=(int)($source_file_size/1000); if(is_uploaded_file($source_file)){ if($source_file_size>...