Jump to content

How to read a web site


hno

Recommended Posts

I'm doing it like this:

 

put this in your head according to your site:

 

<?php
   switch($_GET['pagina']) {
            case "inhoud": $page="BEinhoud.html";break;
		case "logboek": $page="BElogboek.html";break;
            case "profielen": $page="BEprofielen.html";break;
		case "kalender": $page="BEkalender.html";break;
            case "gastenboek": $page="guestbook/list.php?page=1&order=asc";break;
            default: $page="BEhome.html";break;
   }
?>

 

links like this (already in body):

<a href="?pagina=profielen"></a>

 

and then this in body where you wanne let the content load:

<?php include $page; ?>

 

In your pages you wanne load in another you have to delete everything exept your stuff what is in body.

 

   switch($_GET['pagina']) {

-> you can change the word "pagina" (without "") to anything you like but do it then also in your links.

 

Link to comment
Share on other sites

You can use file_get_contents()

 

$content = file_get_contents('http://phpfreaks.com');
echo $content;

 

HI

Thanks for your replies

I think You get wrong my request.

I have a site that name is :www.wxample.com

Now I want example.example2.com display the content of www.example.com.How can I do that without curls?

alexdw suggestion doesn't work for me and kfredje suggestion ,could you explain it more plese

Thanks all

Link to comment
Share on other sites

well,

 

make a file index.php or whatever name you want and a file what you want to load in index.php, something like home.html

 

past in index.php the following stuff:

 

<html>
<head>
<?php
   switch($_GET['example1']) {
            case "inhoud": $page="content.html";break;
            default: $page="home.html";break;
   }
?>
</head>
<body>
<div id="nav">
<a href="?example1=home"></a>
<a href="?example1=inhoud"></a>
</div>
<div id="in this div your pages get loaded">
<?php include $page; ?>
</div>
</body>
</html>

 

K, now I'll explain ya each part.

 

<head>
<?php
   switch($_GET['page']) {
            case "inhoud": $page="content.html";break;
            default: $page="home.html";break;
   }
?>
</head>

 

as you see, here are the links defined. the word "example1" in    switch($_GET['page']) { can be given any name you want, just make sure you give the same name to the links in the body. the worth after case can also be changed in anything you like, here it's "inhoud". Also your default page you want to load have to be set, here it's home.html. This page will be loaded when you load your site.

 

<div id="nav">
<a href="?example1=home"></a>
<a href="?example1=inhoud"></a>
</div>

 

here are the links you've set in the header. I guess you will figure out how to use it.

 

<div id="in this div your pages get loaded">
<?php include $page; ?>
</div>

 

and here is your page loaded in. just past it on the right place and don't change it.

 

Hope you understand. example1 isn't used from your previous post, just that you know. If you have more questions, just ask ^^

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.