Jump to content

Nevets

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Nevets's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. http://www.baxteronline.com/stats.php?mode=cbrowser
  2. Well the problem with doing that... is if you\'re using localhost... I think the remote address will come up and say 127.0.0.1 which isn\'t what you want. On windows: open a command window and type ipconfig and then depending on how your network is setup you\'ll get something like this: Windows IP Configuration Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : IP Address. . . . . . . . . . . . : 192.168.255.4 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.255.1 In my case since I\'m using a LAN I have a private ip address. On Unix(BSD/Linux): use the command: ifconfig you\'ll get something like this: $ ifconfig dc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 192.168.255.5 netmask 0xffffff00 broadcast 192.168.255.255 inet6 fe80::204:5aff:fe5f:e0cc%dc0 prefixlen 64 scopeid 0x1 ether 00:04:5a:5f:e0:cc media: Ethernet autoselect (100baseTX <full-duplex>) status: active you\'re looking for the part that says inet 192.168.255.5 If you need any help, feel free to ask
  3. Using Apache 1.3.27 and PHP 4.3.2-RC2 when I upload an image most of them give the correct MIME type... i.e. image/jpeg. All of them except tiff files. When you upload a tiff file, it gives the file type application/octet-stream which after researching means that it doesn\'t know what it is. In /usr/local/apache/conf/mime.types I have: image/tiff tiff tif and in /usr/local/apache/conf/magic I have: # TIFF and friends # TIFF file, big-endian 0 string MM image/tiff # TIFF file, little-endian 0 string II image/tiff Any suggestions to get it to read as image/tiff as opposed to octet-stream.
  4. if you\'re using a unix flavor, use the following: ps aux |grep httpd get the process id and replace $pid with it kill $pid if that doesn\'t kill it... kill -9 $pid alternate: use top to kill it if you\'re using windows NT based(XP,2000), I believe there should be info under services.msc (use from run)
  5. Nevets

    weird

    just for curiositys sake, was the variable spelled wrong in one place or another?
  6. What you need to do, is follow the instructions for putting it in the directory, but once the file is uploaded in to it\'s temporary location, use the function fopen() to open the file, read the contents of the file in to a variable, use the functions chunk_split(base64_encode()); to encode the file properly, input the variable into MySQL. when you\'re ready to take it back out and display it, set the encoded data to a variable and use this the IMG SRC tag setting SRC=\"data:$filetype;base64,$encoded_data\" <? $result=mysql_query("select data,filetype from images where id=1"); $data=mysql_fetch_row($result); $encoded_data=$data[0]; $filetype=$data[1]; echo "<img src="data:$filetype;base64,$encoded_data">"; ?> I\'ve noticed however that MSIE 6 has a problems with it, but NS7 works, if any one knows if IE can do the Inline images, please inform us. The code for the first part is something like this... <?php $submit=$_POST["submit"]; if ($submit!="Submit") { echo "<table align=center>"; echo "<center><form ENCTYPE="multipart/form-data" method=post action=album.php?mode=upload>"; echo "<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="0">"; echo "<TR><TD>File: <TD><input name="file[]" type=file>"; echo "<input type=submit name=submit value="Submit"></form>"; } else { $file=$_FILES["file"][\'tmp_name\'][0]; $file_name=$_FILES["file"][\'name\'][0]; $file_size=$_FILES["file"][\'size\'][0]; $file_type=$_FILES["file"][\'type\'][0]; $handle = fopen("$file",\'rb\'); $file_content = fread($handle,$file_size); fclose($handle); $encoded_data= chunk_split(base64_encode($file_content)); mysql_query(insert into images set data=\'$encoded_data\',filetype=\'$file_type\',name=\'$file_name\',size=\'$file_size\') or die(mysql_error()); header ("Location: index.php"); } ?> Sorry if I\'ve mad any mistakes in there, I\'m pulling it from the back of my mind. I hope it helps. -Nevets
  7. I\'d check your network stack to make sure McAfee didn\'t leave any presents behind. If all else fails you can run the command: netsh int reset all at the command prompt and it should reset your network stack.
  8. If you don\'t care about the www.example.com you can go to http://www.dyndns.com and you can have them give you a sub-domain for free. The service you\'d be looking for is either Static DNS or Dynamic DNS. They are both free. Here\'s a list of the top level domains you can choose from. http://www.dyndns.org/services/statdns/domains.html you can have up to 5 separate hostname for if you want to use virtual hosting. Having some name is better than having your friends type XXX.XXX.XXX.XXX
  9. From... http://httpd.apache.org/docs/mod/mod_autoindex.html Autoindex Request Query Arguments The column sorting headers themselves are self-referencing hyperlinks that add the sort query options to reorder the directory listing. The query options are of the form X=Y, where X is one of N (file Name), M (file last Modified date), S (file Size, or D (file Description), and Y is one of A (Ascending) or D (Descending). When options other than the file name are used as the sorting key, the secondary key is always the file name. (When the file name is used to sort by, there is no need of a secondary sort key, since file names are guaranteed to be unique, and so the sort order is unambiguous.) Example: If the URL http://your.server.name/foo/ produces a directory index, then the following URLs will produce different sort orders: http://your.server.name/foo/?M=D sorts the directory by last modified date, descending. http://your.server.name/foo/?D=A sorts the directory by file description, ascending. http://your.server.name/foo/?S=A sorts the directory by file size, ascending. See IndexOrderDefault to set the default directory ordering. Note also that when the directory listing is ordered in one direction (ascending or descending) by a particular column, the link at the top of that column then reverses, to allow sorting in the opposite direction by that same column.
  10. http://www.devshed.com/Server_Side/PHP/Soo...less/page1.html
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.