Results 1 to 6 of 6
Thread: Convert PHP file to ASP
-
11-08-2005, 11:49 AM #1Web Hosting Evangelist
- Join Date
- Sep 2003
- Location
- New York
- Posts
- 511
Convert PHP file to ASP
Greetings,
I was wondering if anybody can convert the following PHP code into ASP. Your help would be greatly appreciated!
<?php
$referer = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : "";
$path = "http://www.domain.com/tracker.php?" . $_SERVER['QUERY_STRING'] . "&ref=" . $referer;
header("Location: $path");
?>
Boris- AdWatcher - From the founders of HostVoice, comes the first ad management and tracking service created with web hosts in mind. Track Google AdWords, Overture, hosting directories, local advertising, etc. Compatible with ModernBill, WHM AutoPilot, ClientExec, PayPal, 2CO and others.
- Pay Per Click Marketing Book - Don't spend another dollar on PPC ads before you read this book.
-
11-08-2005, 12:27 PM #2Web Hosting Master
- Join Date
- Jul 2003
- Location
- Kuwait
- Posts
- 5,104
Now, I am not a ASP programmer (haven't touched ASP in more than 4 years) but try this:
Code:<% Dim referer Dim path if Server.RequestVariables("HTTP_REFERER") <> '' referer = Server.RequestVariables("HTTP_REFERER") referer = '' path = "http://www.domain.com/tracker.php?" + Server.RequestVariables("QUERY_STRING") + "&ref=" + referer response.redirect path %>
-
11-09-2005, 12:44 AM #3Web Hosting Evangelist
- Join Date
- Sep 2003
- Location
- New York
- Posts
- 511
Thanks!
This is actually for a client of ours. Could anybody confirm if this is correct before I send it off?
Thanks again!
Boris- AdWatcher - From the founders of HostVoice, comes the first ad management and tracking service created with web hosts in mind. Track Google AdWords, Overture, hosting directories, local advertising, etc. Compatible with ModernBill, WHM AutoPilot, ClientExec, PayPal, 2CO and others.
- Pay Per Click Marketing Book - Don't spend another dollar on PPC ads before you read this book.
-
11-09-2005, 04:03 PM #4Newbie
- Join Date
- Oct 2005
- Posts
- 13
No I would say instead of:
Code:if Server.RequestVariables("HTTP_REFERER") <> '' referer = Server.RequestVariables("HTTP_REFERER") referer = ''
Code:referer = Server.RequestVariables("HTTP_REFERER")
-
11-09-2005, 05:13 PM #5Web Hosting Evangelist
- Join Date
- Sep 2003
- Location
- New York
- Posts
- 511
So just to confirm:
<%
Dim referer
Dim path
referer = Server.RequestVariables("HTTP_REFERER")
path = "http://www.domain.com/tracker.php?" + Server.RequestVariables("QUERY_STRING") + "&ref=" + referer
response.redirect path
%>
Is that the right one?
Boris- AdWatcher - From the founders of HostVoice, comes the first ad management and tracking service created with web hosts in mind. Track Google AdWords, Overture, hosting directories, local advertising, etc. Compatible with ModernBill, WHM AutoPilot, ClientExec, PayPal, 2CO and others.
- Pay Per Click Marketing Book - Don't spend another dollar on PPC ads before you read this book.
-
11-10-2005, 11:38 PM #6Web Hosting Evangelist
- Join Date
- Sep 2003
- Location
- New York
- Posts
- 511
Guys?
Could anybody confirm the right code, please?
Boris- AdWatcher - From the founders of HostVoice, comes the first ad management and tracking service created with web hosts in mind. Track Google AdWords, Overture, hosting directories, local advertising, etc. Compatible with ModernBill, WHM AutoPilot, ClientExec, PayPal, 2CO and others.
- Pay Per Click Marketing Book - Don't spend another dollar on PPC ads before you read this book.