Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   Giving back a bit PHP redirect (https://www.warriorforum.com/programming/1302422-giving-back-bit-php-redirect.html)

hometutor 19th September 2017 03:10 PM

Giving back a bit PHP redirect
 
I couldn't use header since it had already tranfered

I tried a javascript redirect but got an undefined page

I used this

file_put_contents('logs.txt', "<script>window.location =' .$rsslink.'.php</script>".PHP_EOL , FILE_APPEND | LOCK_EX);

to find the problem

The . was appearing in the actual redirect. So I made the whole thing a variable

Code:


$redirect="<script>window.location ='";


$redirect.=$rsslink.'.php';

$redirect.="'</script>";

echo $redirect;

It worked! It redirected to my generated page. I'm sure someone has a smoother solution, but I just wanted to give back a bit.

Rick


All times are GMT -6. The time now is 03:59 AM.