hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : master page for aphp site
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

master page for aphp site

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 08-12-2010, 02:09 AM
danyal danyal is offline
Newbie
 
Join Date: Aug 2010
Location: Pakistan
Posts: 14
Cool

master page for aphp site


hy
all want to implement master page for my php site.... looking for a best technique

Reply With Quote


Sponsored Links
  #2  
Old 08-12-2010, 08:07 AM
mattle mattle is offline
Web Hosting Master
 
Join Date: May 2009
Posts: 766
I'm not sure what you mean by a "master" page, but this might be the sort of thing you're looking for:

PHP Code:
<?php
//index.php

// include library files as needed
require_once("sitelib.inc");

// display header
require("header.php");

// parse get params and include the appropriate files
$page = isset($_GET['page']) ? $_GET['page'] : "";
switch (
$page)
{
  case 
"contactus":
    require(
"contact.php");
    break;
  case 
"something":
    require(
"something.php");
    break;
  default:
    require(
"main.php");
}

require(
"footer.php");
?>
Then, all you your site links would look like this:

index.php?page=xxxx

That will wrap all of your pages in a standard template, and your included library can take care of such things as authentication, etc.

Reply With Quote
  #3  
Old 08-13-2010, 01:43 AM
danyal danyal is offline
Newbie
 
Join Date: Aug 2010
Location: Pakistan
Posts: 14
Thanx mattle...yea i was looking 4 something like u have told...one thing more. can i send my URL to redirect to different pages in encripted form? if yes thn who will decrypt it ?
thanx

Reply With Quote
Sponsored Links
  #4  
Old 08-13-2010, 04:44 AM
abacies abacies is offline
WHT Addict
 
Join Date: May 2010
Posts: 153
Hi mate,

Nice concept mattle.Thanks

Thanking you,
David.

Reply With Quote
  #5  
Old 08-16-2010, 08:35 AM
mattle mattle is offline
Web Hosting Master
 
Join Date: May 2009
Posts: 766
Quote:
Originally Posted by danyal View Post
Thanx mattle...yea i was looking 4 something like u have told...one thing more. can i send my URL to redirect to different pages in encripted form? if yes thn who will decrypt it ?
thanx
I'm not really sure what you're asking for here...I suppose you could encrypt a url and send it to another page, but decryption would be up to whoever maintains that page...what are you trying to accomplish?

Reply With Quote
  #6  
Old 08-17-2010, 02:23 AM
danyal danyal is offline
Newbie
 
Join Date: Aug 2010
Location: Pakistan
Posts: 14
actuall i want to hide my folder hierarchy in URL..:-)...... thats y i want to encrypt it. bt if i encrypt my whole URL, how the DNS can resolve it.....:-(

Reply With Quote
  #7  
Old 08-17-2010, 03:44 AM
joza joza is offline
Newbie
 
Join Date: Mar 2010
Posts: 16
danyal, i think what you should take a look at is htaccess rewriting rules, you can easily hide the structure of your folder hierarchy using that

Check this post to get an idea http://www.webhostingtalk.com/showthread.php?p=6957641

So suppose, you have folders like article,etc you can redirect them using the same method. You can also add a "Options -Indexes" in your .htaccess to hide the folder from direct listing in the browser

Reply With Quote
  #8  
Old 08-17-2010, 04:36 AM
danyal danyal is offline
Newbie
 
Join Date: Aug 2010
Location: Pakistan
Posts: 14
htaccess rewrite

THANX JOZA ..THATS SOMETHING new n very useful for me.....

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need a one page site (Home Page) compelted Ryan - HostATree Design Requests 4 10-20-2009 01:47 PM
cPanel/WHM Master 404 error page for all accounts? MH-Andy Hosting Security and Technology 0 04-04-2009 04:55 PM
Page Translator - Full Master Reseller rights. Jay-Z Other Offers & Requests 0 06-03-2006 11:09 AM
Poll Master HELP TRYING TO LINK POLL TO EXISTING WEB PAGE!?? Johnny916 Web Design and Content 5 03-26-2004 04:09 AM

Related posts from TheWhir.com
Title Type Date Posted
Pagely Launches Partner API for WordPress Shops to Offer Web Hosting Web Hosting News 2012-08-30 16:46:36
Netcraft: Attacks Against DOJ Resume in Apparent ACTA Protest Web Hosting News 2012-01-25 15:25:35
Webs.com Integrates Mobile Site App into Website Builder Web Hosting News 2011-08-25 15:28:21
Google Launches Page Speed CDN Service Web Hosting News 2011-07-28 20:39:17
HostUCan Releases Hosting Relevancy Analysis Tool for Website Owners Web Hosting News 2011-07-11 14:52:36


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?