Jump to content

mcloan

Members
  • Posts

    48
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mcloan's Achievements

Member

Member (2/5)

0

Reputation

  1. I am trying to specify pramaters on a redirect. I figure I can <?php $strKeyword = $_GET['kw'];?> and then add ?sid=<?php echo $strKeyword ;?> to the below redirection. However I can not get the below to work. Does anyone know how I can accomplish this? When I run the below I just get a blank screen. It does not redirect. <?php header( 'Location: http://www.mylink.com/g9117y1A719PRVRXRZRPUQRRSWW?sid=<?php echo $strKeyword ;?>' ) ; ?> Thank you! thank you.
  2. I was totally was missing the ad, thank you. I implemented your suggestion like the below, but then page does not redirect at all with the below code. Any further suggestions would be much appreciated. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns=" http://www.w3.org/1999/xhtml"> <?php $strKeyword = $_GET['ad']; <head> <meta http-equiv="Refresh" content="0;URL=http://www.mylink.com/r/xxx/af=p40dd25&ad=echo $strKeyword ;?>"> <title>Repair Your Credit Today - Lexington Law</title> </head> <body> </body> </html>
  3. I have the below code but I can not get the last part of the redirect url ($strKeyword=<?php echo($_REQUEST['ad']); ?>) to pass on the redirection. It just comes up blank. When I echo it up top it reads the value to the screen but in the last part of the meta http-equiv="Refresh" it will not pass. Does anyone know how I can get around this and get it to pass with the url in the redirect? Thank you. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns=" http://www.w3.org/1999/xhtml"> $strKeyword=<?php echo($_REQUEST['ad']); ?> <?php echo($strKeyword);?> <head> <meta http-equiv="Refresh" content="0;URL=http://www.mysite.com/r/aff/af=p40XX5&ag=<?php echo($strKeyword);?>"> <title>Repair Your Credit Today - Lexington Law</title> </head> <body> </body> </html>
  4. Ok, I think I get it. Is the way I set my cookie ok? It appears weird cause in my cookie folder it is called index and is 528K. Does this sound right? Thank you.
  5. Perfect, that will work great. I have one more question. I am thinking some of my affilate links I want to redirect them though a php redirect. So I figure I can set a cookie and then in the redirect file it will read somthing like <?php header( 'Location: http://www.myaffilatelink.com?sid=<?=$_REQUEST['id']?>' ) ; ?> Cookie <?php if ($_REQUEST['sid']) { setcookie("requestid",$_REQUEST['sid'],time()+(86400*365),"/"); } ?> I have two question. The above cookie code is setting a cookie name index in my cookies and it is 528kb. So I do not think the code is working. Can someone suggest what I need to do to make this code work correctly? Secondly, if in the link h**p://www.myaffilatelink.com?sid=<?=$_REQUEST['id']?>' if I want to add the $reference="lp1" so that the final output will be h**p://www.myaffiliatelink.com?sid=lp1-keyword how do I do this? Your help is much appreciated. I have been trying so many different ways and can not get any of them to work. I am going nuts... LOL. Thank you.
  6. I am not sure the ref would pick up for tracking in my Commissio Junction account beasue it only picks up sid from the affiliate link. So what I had hoped to do in make sid something like this lp1 online dating for the first landing page or lp2 online dating for the second landing page. So essentially the new sid code would combine the lp1 with the keyword passed in the url. Excuse my lack of understanding but is that what the above code does? Thank you.
  7. I am trying to use dynamic insertion with adwords. I need some help with the code. My url would be something like http://www.mysite.com/landingpage.php?q={keyword} Then on my landing page I would have the below code on an affilaite link. <?php $keyword = $_GET[’q']; if(!strcmp($keyword, “”)) { echo ‘<a href=”http://www.myaffiliatelink.com?sid=Default”>Anchor</a>’; } else { echo ‘<a href=”http://www.myaffiliatelink.com?sid=’ . $keyword . ‘>Anchor</a>’; } ?> However for the sid code where it picks up a $keyword I would also like to include a reference for the landing page. For instance maybe the sid in CJ would read lp1 - $keyword. This would allow me to split test different landing pages. I do not know how to insert the lp1 in the above code echo ‘<a href=”www.myaffiliatelink.com?sid=’ . $keyword . ‘>Anchor</a>’; . Is it possible? If so can some help me with this? Thank you.
  8. I have a php redirect on a php page as stated below. Can someone tell me if I want a message stating "you are being redirected to this site...." printed on the page how I would go about this? <?php header( 'Location: http://www.theredirectedsite.com' ) ; ?> Thank you.
  9. I have a static html site and I am going to be moving some urls to new locations on the site.  I would like to use a 301 redirect through a .htaccess file, but want to be sure I do it 100% correct.  From what I have read on the web the below is what I think I need to do.  Can someone tell me if I am totally correct. 1.  open blank note pad and save it as .htaccess 2.  For each 301 redirect simply place the below in as may times as needed: Redirect 301 /111-strawberrybread.html http://www.mysite.com/specialbreads/strawberrybread.html 3.  Save .htaccess file and place it in my root directory. Is this correct?  Secondly any special requirements need on the server to handle this other than apache server with mode rewrite turned on? Thank you!
  10. I am trying to post to a form with CURL and the form has a file name specified as the following: <input name="locator1:textPostalCode" type="text" id="locator1_textPostalCode" style="width:75px;" size="20" /> Is it correct I would make my $data variable for the post like the following?  I am concerned about the ":" in the name of $data.  Will this work with CURL? $data="locator1:textPostalCode=77090"; [code] $ch = curl_init(); // set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURL_ERROR, 1); curl_setopt($ch, CURLOPT_REFERER, $url); curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt"); curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt"); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 600); curl_setopt($ch, CURLOPT_TIMEOUT, 600); // grab URL, and return output $Contents = curl_exec($ch); [code/] [/code]
  11. When using php curl is there something special that needs to happen when posting to a page with a dropdown box or do I just post it such as $data="producttype=$dropdownboxvalue";? Thank you.
  12. Thank you, I did check the manual, but I am a bit new to programming and was a bit confused by the examples becasue they were mostly using arrays. Thank you again your simplified version worked perfect and now I think I have the concept... :)
  13. [quote author=AndyB link=topic=117126.msg477620#msg477620 date=1165084611] str_replace() [/quote] You mind providing an example?  I tried this function and could not get it to work. Thank you.
  14. Can anyone tell me the best way to remove the + from $city=Apple+Valley so that $city become $city=Apple Valley ? Thank you!
  15. Is there a way to use strpos or a similar function to find a location and go backwards to another location.  i.e.  11234 Blank St, Houston, TX USA So starting from $position=strpos($line, "USA") would there be away to find the second comma going back from USA with a strpos or similar function.  I want to prevent from counting character positions if possible. Thank you.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.