Jump to content

Remove all HTTP's via PHP...


Badchip

Recommended Posts

1) If *.html page it would have to be enabled to be treated as PHP.

2) The text in question has to used as text string to replace and echo out new link in PHP, OR ALL body content, applied to variable, and search and replaced.

Another option would be to use mod_rewite in htaccess, it won't replace but redirect to required URL address.

Link to comment
Share on other sites

You can use file_get_contents if you're trying to read a different file.  If it's a .html file, and PHP is not configured to run in .html files, then it sounds like you're trying to open a different file than the PHP file.  

If you're trying to change the output that a PHP file will generate, the easiest way to do that is to use ob_start to start output buffering, and pass it a function that will run when the output buffer gets flushed.  You can use that function to find and replace whatever you want before it gets sent to the browser.

http://php.net/manual/en/function.ob-start.php

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...