View Full Version : fopen ("http//.../index.php", "r")
kazendar
10-30-03, 07:47 AM
I used fopen() and fgets() to read file "http://.../index.php"
and fputs () to output file.
My problem is : any Php tags are NOT written to a file !
but only Htm parts.
What should i do to read the whole index.php file, including Php tags ?
What you want to do?
include php in html or html in php?
kazendar
10-30-03, 08:19 AM
My purpose is to read php file on website, and to get exact copy of it
RocketJeff
10-30-03, 08:26 AM
You can't do it that way. PHP is a server-side scripting language so the PHP is being processed by the other server before you retreve it.
I assume you're trying to grab it legitimately (grabbing other people's scripts without their knowledge is bad) so contact the other webmaster and either have him email you the script, give you FTP access to it, or make a copy without the .php ending.
Note: since scripts, like any other part of a website, are protected by copyright, it is illegal to copy them without the owners approval.
kazendar
10-30-03, 08:40 AM
Jef Most of your answer is right. How to ?
( or make a copy without the .php ending )
RocketJeff
10-30-03, 08:52 AM
It's really up to the other webmaster on how he want to give you his code.
Either he: has to email it to you, or
has to give you FTP access, or
has to rename it
There isn't anything you can do without his approval/help. That's one of the big advantages of doing thing in scripts - they help stop people from stealing stuff from your site.
vBulletin v3.6.0, Copyright ©2000-2010, Jelsoft Enterprises Ltd.