PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 17th, 2004, 06:23 AM
MikeBoogie MikeBoogie is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 3 MikeBoogie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 sec
Reputation Power: 0
convert php to html

Iv searched the web for tools that can convert php to html but can't find any. Does anyone know of any or can convert this php script to html for me. any help is very appreciated. Here is the script

http://home.comcast.net/~mikeboogie/PHP_Script.txt

Reply With Quote
  #2  
Old October 17th, 2004, 10:19 AM
m3rajk m3rajk is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 24 m3rajk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
you cant.
php is on the fly. html is static
php outputs html, xhtml or xml (commonly, but can output anything) ae you se it to do


btw: http://home.comcast.net/~mikeboogie/PHP_Script.txt

is a virtual directory script

Last edited by m3rajk : October 17th, 2004 at 10:21 AM. Reason: adding info on script

Reply With Quote
  #3  
Old October 17th, 2004, 11:05 AM
MikeBoogie MikeBoogie is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 3 MikeBoogie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 sec
Reputation Power: 0
Yeah I knew this script is a virtual directory script. The reason why I want it is because comcast don't support indexing and that's what I want some type of script for indexing. Do you or anyone know of a html virtual directory script?

Reply With Quote
  #4  
Old October 17th, 2004, 11:22 AM
m3rajk m3rajk is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 24 m3rajk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
is your directory static? or dynamic?



let me say this once more
HTML IS STATIC. IT DOES NOT CHANGE. IT WILL NOT CHANGE UNLESS YOU GO IN AND MODIFY IT.




ok. maybe you get it now. you need php, asp, jsp, or ssi in order tomake something on the fly. therfore there is not html script and never will be.

i feel like i'm talking to a brick wall. i stated that in my first response.

if comcast will not put php or anything else on your space, then make your own server and run your own server.
get a host aliasing account at a place like http://www.dyndns.org/ and run your own. when you ip changes just update it on your account.

Reply With Quote
  #5  
Old October 17th, 2004, 01:07 PM
MikeBoogie MikeBoogie is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 3 MikeBoogie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 sec
Reputation Power: 0
Quote:
Originally Posted by m3rajk
is your directory static? or dynamic?



let me say this once more
HTML IS STATIC. IT DOES NOT CHANGE. IT WILL NOT CHANGE UNLESS YOU GO IN AND MODIFY IT.




ok. maybe you get it now. you need php, asp, jsp, or ssi in order tomake something on the fly. therfore there is not html script and never will be.

i feel like i'm talking to a brick wall. i stated that in my first response.

if comcast will not put php or anything else on your space, then make your own server and run your own server.
get a host aliasing account at a place like http://www.dyndns.org/ and run your own. when you ip changes just update it on your account.
I'm not experienced in html or php scripting so you need to chill out.. I only asked so i know

Reply With Quote
  #6  
Old October 17th, 2004, 01:26 PM
m3rajk m3rajk is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 24 m3rajk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by MikeBoogie
I'm not experienced in html or php scripting so you need to chill out.. I only asked so i know
let's go back to my original post so you will understand why i bolded and enlarged that:
Quote:
Originally Posted by m3rajk
you cant.
php is on the fly. html is static
php outputs html, xhtml or xml (commonly, but can output anything) as you set it to do



btw: http://home.comcast.net/~mikeboogie/PHP_Script.txt

is a virtual directory script
let me highlight the first part.
Quote:
Originally Posted by m3rajk
you cant.
php is on the fly. html is static
php outputs html, xhtml or xml (commonly, but can output anything)
as you set it to do
now let's look at your response.
Quote:
Originally Posted by mikeboogie
Yeah I knew this script is a virtual directory script. The reason why I want it is because comcast don't support indexing and that's what I want some type of script for indexing. Do you or anyone know of a html virtual directory script?
do we see any reason why i felt you completely ignored what i told you initally?
i simply decided that you ignored what i said, because your response is idicitive of that.


if you're serious about getting into this, i suggest you start with learning xhtml, then go to php.
and take a formal course. things like w3c schools are good for references, but really nothing else.

Reply With Quote
  #7  
Old October 19th, 2004, 04:33 AM
WesterWorld WesterWorld is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Location: The Netherlands
Posts: 2 WesterWorld User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Static PhP......

Quote:
Originally Posted by MikeBoogie
Iv searched the web for tools that can convert php to html but can't find any. Does anyone know of any or can convert this php script to html for me. any help is very appreciated. Here is the script

http://home.comcast.net/~mikeboogie/PHP_Script.txt

One thing I sometimes do is this:
I run the script (i.e. view the Php outputted HTML and then use my browser to view the source.
I then save the view-source result as a HTML page.

I sort of use Php to generate static pages.
Dumb? Not always.....

Greetings,
Harm

Reply With Quote
  #8  
Old October 19th, 2004, 08:06 AM
m3rajk m3rajk is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 24 m3rajk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
something makes me think that they dont allow php. nor asp.

comcast does not give much of anything on their server for your homepage.

consider getting a perl script that will take the titles of the items and output a file that reads something like
Code:
<br /><a href="file_name.extension">file_name.extension</a>
<br /><a href="next_file_name.extension">next_file_name.extension</a>
then you just need to make the begining and end of the html page

Reply With Quote
  #9  
Old June 26th, 2010, 12:03 AM
miniman3214 miniman3214 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2010
Posts: 1 miniman3214 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 22 sec
Reputation Power: 0
Ive Got It

Quote:
Originally Posted by MikeBoogie
Iv searched the web for tools that can convert php to html but can't find any. Does anyone know of any or can convert this php script to html for me. any help is very appreciated. Here is the script

http://home.comcast.net/~mikeboogie/PHP_Script.txt


Just Paste The Code With The <?php and ?> tags and it will work anywhere in html
Code:
<?php /*
	PHP Directory Indexer
	---------------------

	Documentation
	-------------
	This is a small script which indexes the content of the directory where
	it is located (including the directories below).
	With the variable 'allow_parent' (see below) you can decide if you want
	to allow switching to the parent directory of the script. (by default
	it is turned off)	

	Copyright (c) 2004 Till Biedermann <tillbiedermann@yahoo.de>

	Changes
	----------
	
	2004-09-16
		- fixed security problem with manipulated URL's
	
	2004-08-27
		- made the script working with register_globals=Off
		- fixed the bug that files with the same like the script
		  were ignored
	
	2004-08-09
		- cleaned up the php and css code
		- valid xhtml 1.1 now
	
	License
	-------
	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
	USA.
*/ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<meta name="author" content="Till Biedermann" />
	<meta name="description" content="directory listing" />
	<title>Directory listing powered by TBmnet.de</title>
	<style type="text/css">
		body	{	font-family:	Tahoma, sans-serif;	}
		img 	{ 	border:		0px;
				margin-top:	6px;		}
		h2	{	background-color:	#eeeeee;
				color:		#c0c0c0;
				letter-spacing:	.2em;
				padding:		.2em;
				text-align:	center;
				border-top:	solid #aaaaaa 1px;
				border-bottom:	solid #aaaaaa 1px;	}
		table	{	border-collapse:	collapse;
				margin-left:	auto;
				margin-right:	auto;
				margin-bottom:	10px;
				border:		solid #dddddd 1px;	}
		th	{	background-color:	#dddddd;		}
		td	{	padding:		2px 10px 2px 10px;
				background-color:	#ffffff;
				border:		solid #dddddd 1px;}
		a	{	text-decoration:	none;	
				font-weight:	bold;		}
		.black	{	color:		#000000;		}
	</style>
</head>
<body>
<?php 
	//  false - don't allow switching to the parent-directory of this script
	// true - allow simple switching to the parent-directory (via 'href')

	$allow_parent = "false";

	//configuration ends here---------------------------------------------------------------------------------------------------------------------------

//==================================================  =====================================
	$path=$_GET["path"];
	$SCRIPT_NAME=getenv("SCRIPT_NAME");
	//put directory content in arrays-----------------------------------------------------------------------------------------------------------------
	if (!isset($path)) { $path = "./"; }
	if (!file_exists($path)) { echo "<h2>File not found!</h2>"; exit; }
	if (strstr($path,"..")) { echo "<h2>invalid path!</h2>"; exit; }
	$base_dir = getcwd();
	chdir($path);
	$current_dir = getcwd();
	$directory = dir("./");	
	$directories_array = array();
	$files_array = array();
	while ($file = $directory->read()) {
		if (is_dir($file) AND $file != ".") 	{ $directories_array[] = $file; }
		if (is_file($file)) 			{ $files_array[] = $file; }
	}
	$directory->close();
	//sort and output the arrays-----------------------------------------------------------------------------------------------------------------------
	echo "<h2>Directory listing for <span class=\"black\">".basename($current_dir)."</span></h2>";
	echo "<table>";
	echo "<tr><th>Name</th><th>Size</th><th>Date</th></tr>";
	sort($directories_array);
	foreach($directories_array as $value) {
		if ($value=="..")	{ $new_path=strrev(substr(strstr(substr(strstr(strre  v($path),"/"),1),"/"),1)); }
		else			{ $new_path=$path.$value; }
		if (($value != "..") OR ($base_dir != $current_dir)) {
			echo "<tr><td><a href=\"$SCRIPT_NAME?path=".urlencode($new_path."/")."\">$value</a><b>/</b></td><td></td><td>".gmdate("d M Y H:i",filemtime($value))."</td></tr>"; }
		elseif ($allow_parent == "true") {
			echo "<tr><td><a href=\"$value\">$value</a><b>/</b></td><td></td><td>".gmdate("d M Y H:i",filemtime($value))."</td></tr>"; }
	}
	sort($files_array);
	foreach($files_array as $value) {
		if($value != basename($SCRIPT_NAME) or $path!="./") {
			$filesize=filesize($value);
			if 	($filesize > 1073741823)	{ $filesize = sprintf("%.1f",($filesize/1073741824))." GB"; }
			elseif 	($filesize > 1048575) 	{ $filesize = sprintf("%.1f",($filesize/1048576))." MB"; }
			elseif 	($filesize > 1023) 	{ $filesize = sprintf("%.1f",($filesize/1024))." kB"; }
			else				{ $filesize = $filesize." byte"; }
			echo "<tr><td><a href=\"$path$value\">$value</a></td><td>$filesize</td><td>".gmdate("d M Y H:i",filemtime($value))."</td></tr>";
		}
	}
	echo "</table>";
	//footer-----------------------------------------------------------------------------------------------------------------------------------------------------
?>

Reply With Quote
  #10  
Old January 3rd, 2011, 12:55 AM
3magic 3magic is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2011
Posts: 1 3magic User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 3 sec
Reputation Power: 0
Hi,thanks for this informative concept.Really i was not aware of it before.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > convert php to html


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap