TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 10-29-2010, 02:15 PM   #1 (permalink)
The Wanderer
 
Join Date: Aug 2009
Location: tilburg, netherlands
Posts: 5
Thanks: 1
gamerNL is on a distinguished road
Help clone a webpage using php?

hi all,

do anyone know how to clone a webpage using php and after cloning rename the webpage?

please help me
__________________
don't life today but life tommorow
Send a message via MSN to gamerNL
gamerNL is offline  
Reply With Quote
Old 10-29-2010, 02:51 PM   #2 (permalink)
The Addict
 
tony's Avatar
 
Join Date: Aug 2008
Posts: 336
Thanks: 8
tony is on a distinguished road
Default

What do you mean by cloning?
tony is offline  
Reply With Quote
Old 10-29-2010, 03:00 PM   #3 (permalink)
The Wanderer
 
Join Date: Aug 2009
Location: tilburg, netherlands
Posts: 5
Thanks: 1
gamerNL is on a distinguished road
Default

Quote:
Originally Posted by tony View Post
What do you mean by cloning?
a exact copy from a pre-made webpage (wich is already on the server
__________________
don't life today but life tommorow
Send a message via MSN to gamerNL
gamerNL is offline  
Reply With Quote
Old 10-29-2010, 07:30 PM   #4 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by gamerNL View Post
a exact copy from a pre-made webpage (wich is already on the server
Using curl you can get the HTML and everything you need for a clone of the page design. But there is absolutely no way to steal the PHP code form a server that you do not have backed access to.
__________________

Village Idiot is offline  
Reply With Quote
The Following User Says Thank You to Village Idiot For This Useful Post:
gamerNL (10-29-2010)
Old 10-29-2010, 07:46 PM   #5 (permalink)
The Wanderer
 
Join Date: Aug 2009
Location: tilburg, netherlands
Posts: 5
Thanks: 1
gamerNL is on a distinguished road
Default

Quote:
Originally Posted by Village Idiot View Post
Using curl you can get the HTML and everything you need for a clone of the page design. But there is absolutely no way to steal the PHP code form a server that you do not have backed access to.
it's kinda my code that needs to be cloned when a user signs up.
for example.

I make some account called: "omega" I (the user) get a personal page wich is: "omega.php"
the easiest way to achieve that is cloning I think
__________________
don't life today but life tommorow
Send a message via MSN to gamerNL
gamerNL is offline  
Reply With Quote
Old 10-30-2010, 05:33 PM   #6 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by gamerNL View Post
it's kinda my code that needs to be cloned when a user signs up.
for example.

I make some account called: "omega" I (the user) get a personal page wich is: "omega.php"
the easiest way to achieve that is cloning I think
It isn't. You need to look into mod rewrite. You can make it look like they are on their own page whn they are not.

Basically mod rewrite allows you to rewrite the URLs so the following page (form example)
http://testsite.com/users/omega
Actually runs
http://testsite.com/user.php?name=omega
__________________

Village Idiot is offline  
Reply With Quote
Old 05-05-2011, 07:51 PM   #7 (permalink)
The Wanderer
 
clonepal's Avatar
 
Join Date: May 2011
Posts: 10
Thanks: 1
clonepal is on a distinguished road
Default

Press ctrl + s in your browser, save files to your PC - modify links, upload to your domain.

NOTE:Pleass be aware that if the clone site gets indexed by google and the website owner see that you cloned his website you can get sued.

The best way to clone a site is to understand its functionality and develop it, with a custom template, and same functionality. This is what we do on our company.

Hope that helps.
__________________
web development - php proxy script
clonepal is offline  
Reply With Quote
Old 05-12-2011, 12:09 PM   #8 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

I think you may need to re-think your architecture, seems like to me you are using a PHP file per page? Sorry if I have the wrong end of the proverbial stick. I'm also assuming you are using a DB to populate user information.

The easiest way is like VI suggested, using mod_rewrite. To elaborate on what I think hes suggesting (and is my suggestion also).
You need to reduce all traffic to one point of access (i.e. index.php) and write a script that farms off requests to the necessary script files (for example user.php for viewing user profiles, which is what I'm assuming you are trying to achieve). After you have done this you can then use mod_rewrite to pretty up the urls.

The technique of focusing user requests to a single, manageable place is often called a front controller (amongst other names). These are usually found in MVC style applications (because it complements the technique well) and once you get to grips with it you wont want to develop without it (like MVC, TDD and all the other cool stuff I have grown to love!)

A simple overview:
http://www.w3style.co.uk/a-lightweig...ller-for-php-5

obviously they can be (and often are) more complex than the examples described on that article, but it should give you a good idea of the method.

Hope that helps.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get PHP 5. to work? Newbie windows PHP guy DotNetTim Absolute Beginners 11 02-01-2013 11:02 AM
Using the Clone Construct to Clone an Object Wildhoney Advanced PHP Programming 5 01-29-2013 11:51 AM
10 PHP Myths Dispelled Wildhoney General 9 06-15-2009 06:55 AM
PHP Compressor Kalle Script Giveaway 8 05-28-2008 12:14 AM
what are all the subjects in php? sarmenhb General 7 01-21-2008 05:41 PM


All times are GMT. The time now is 02:07 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design