Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: HTML to PHP

  1. #11
    Join Date
    Aug 2004
    Location
    Over there. ^_^
    Posts
    1,100
    Tokens
    0

    Latest Awards:

    Default

    example this is a code for logging visitors to your site:
    Code:
    <?php
    
    //using the date() function
    $time = date("F jS Y, h:iA"); 
    
    //$remote_addr is PHP variable to get ip address
    $ip = $REMOTE_ADDR;
    
    //$hostname show the users host
    $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
    
    //$http_referer is PHP variable to get referer
    $referer = $_SERVER["HTTP_REFERER"];  
    
    //$http_user_agent is PHP variable for browser
    $browser = $HTTP_USER_AGENT;  
    
    //what page they came from
    $page = $_SERVER['REQUEST_URI'];
    
    //use the fopen() function
    $fp = fopen("log.php",  "a");  
    
    //using the fputs() function
    fputs($fp, " I WANT TO CONVERT SOME HTML TO GO HERE!!!!             ");
      
    fclose($fp);  
    
    ?>
    *Image Removed


    Ahemm.. How exactly was my sig innapropriate?
    Goddamit i hate this forum :@
    I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@

  2. #12
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    why would u wnat to convert

    Just change the exsetoion to php, and pure htmnl will go 100%

    only stuff inside <?php ?> tags genirete as php

  3. #13
    Join Date
    Aug 2004
    Location
    Over there. ^_^
    Posts
    1,100
    Tokens
    0

    Latest Awards:

    Default

    the place were it says i want to convert some html is how it displays the log, i cant just put normal html in there because it doesnt work i need to convert some font tags for this code and thats it but i would just like a code converter just incase i need it for anything else
    *Image Removed


    Ahemm.. How exactly was my sig innapropriate?
    Goddamit i hate this forum :@
    I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@

  4. #14
    Join Date
    Nov 2004
    Location
    Daventry, Northants
    Posts
    1,510
    Tokens
    0

    Latest Awards:

    Default

    Cope it into notepad and save it as news.php or somthing

  5. #15
    Join Date
    Oct 2004
    Location
    Scotland
    Posts
    2,280
    Tokens
    1,075

    Latest Awards:

    Default

    Quote Originally Posted by simplesimon12
    The bravenet 1 is rubbish.

    Err you don't need to convert it really.

    As PHP Works with HTML anyway
    php is HTML

    http://www.stupidian.com
    (contains mild swearing)

  6. #16
    Join Date
    Jul 2004
    Posts
    1,457
    Tokens
    0

    Latest Awards:

    Default

    Why not just change the extension to .php instead of .HTML? ;/

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •