Getting a PHP redirect to function correctly

3 replies
I'm using PHP directs to cloak affiliate links. The redirects are working fine for Amazon links but the one below (for screenflow) is not working.

<?php
header ('Location: http://get.esellerate.net/get/ALP948895116/default.htm?skuid=SKU57198387398&affid=AFL73198037 98&at=');
?>

(the blue color is the affiliate link)

Whenever I try to use this link I get this:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /homepages/33/d202912428/htdocs/vidbiz/go/screenflow.php on line 8

Parse error: syntax error, unexpected T_STRING in /homepages/33/d202912428/htdocs/vidbiz/go/screenflow.php on line 9

Can someone with a clue please help me out???

Kevin
#correctly #function #php #redirect
  • Profile picture of the author icun
    There is a blank space between the 7 and 9 at the end of the URL. That would cause an error.
    {{ DiscussionBoard.errors[2592446].message }}
  • Profile picture of the author richardmadison
    Hi there,

    The code works ... As icun mentioned, there is a space in link which translates to a %20 in the URL ( Telestream ScreenFlow )

    I have put this code in a php page and it redirects fine.

    I suspect the problem is other code - check around lines 8 and 9 of screenflow.php as per the error messages.

    Without the entire php file, it's hard to speculate.

    Good luck.
    Signature

    Richard Madison
    https://lifetime.hosting
    Literally the last hosting you will ever buy.

    {{ DiscussionBoard.errors[2592502].message }}
    • Profile picture of the author Kevin AKA Hubcap
      Originally Posted by richardmadison View Post

      Hi there,

      The code works ... As icun mentioned, there is a space in link which translates to a %20 in the URL ( Telestream ScreenFlow )

      I have put this code in a php page and it redirects fine.

      I suspect the problem is other code - check around lines 8 and 9 of screenflow.php as per the error messages.

      Without the entire php file, it's hard to speculate.

      Good luck.
      The space between the 7 and 9 is my fault. It happened when I copy/pasted the file but is not in the original file.

      I tried the code again. No luck.

      Here is the entire PHP code:

      {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540
      {\fonttbl\f0\froman\fcharset0 Times-Roman;}
      {\colortbl;\red255\green255\blue255;\red194\green5 4\blue9;\red194\green54\blue9;}
      \margl1440\margr1440\vieww9000\viewh8400\viewkind0
      \deftab720
      \pard\pardeftab720\ql\qnatural

      \f0\fs24 \cf2 <?php\
      header ('Location: \cf3 Telestream ScreenFlow ');\
      ?>}

      edit: I opened the above php file in dreamweaver, copy/pasted the code and it works correctly when clicked (on the forum).

      Why do I still get the error message when I type in the url of the file in the address bar??
      {{ DiscussionBoard.errors[2592623].message }}

Trending Topics