Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-02-2008, 04:18 AM   #1
Shaze
Confirmed User
 
Join Date: Oct 2003
Location: Cyberspace
Posts: 2,662
PHP Gurus, fix this simple code

I'm doing a redirect in a php file, but having a problem with how to display the id at the end of the URL. Basically where it says "echo $id". What's the correct code for this?

<?php
header("location:http://refer.ccbill.com/cgi-bin/clic...6-0000&PA=echo $id");
exit;
?>


thanks in advance
Shaze is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-02-2008, 04:22 AM   #2
Sam Granger
Confirmed User
 
Sam Granger's Avatar
 
Join Date: Dec 2004
Location: NL (Eindhoven), CZ(Prague), FR(Concarneau)
Posts: 3,958
<?php
header('http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=929876-0000&PA='. $id);
exit;
?>
__________________
[img]http://****************/sig/fhv3_j2_624x80_2.gif[/img]
$35-40 Per Signup, 60-70% Rev Share, over 80 Sites, Exclusive Sites, tons of free content
14,000+ Free hosted Galleries, RSS feeds, Domain Hosting, Embedded Flash Movies
Join Fetish Hits now!
ICQ: 358652230
Sam Granger is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-02-2008, 04:24 AM   #3
Sam Granger
Confirmed User
 
Sam Granger's Avatar
 
Join Date: Dec 2004
Location: NL (Eindhoven), CZ(Prague), FR(Concarneau)
Posts: 3,958
and maybe make exit to this:

exit();
__________________
[img]http://****************/sig/fhv3_j2_624x80_2.gif[/img]
$35-40 Per Signup, 60-70% Rev Share, over 80 Sites, Exclusive Sites, tons of free content
14,000+ Free hosted Galleries, RSS feeds, Domain Hosting, Embedded Flash Movies
Join Fetish Hits now!
ICQ: 358652230
Sam Granger is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-02-2008, 04:28 AM   #4
Shaze
Confirmed User
 
Join Date: Oct 2003
Location: Cyberspace
Posts: 2,662
Quote:
Originally Posted by Sam Granger View Post
and maybe make exit to this:

exit();

cool it worked. what if I need to have a URL at the end of the redirect. code below, but i know it's wrong:

<?php
header('location:http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=98956-0000&PA='. $id'&HTML=http://www.site.com);
exit();
?>
Shaze is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-02-2008, 04:40 AM   #5
Adultnet
Confirmed User
 
Join Date: Sep 2003
Posts: 8,713
Quote:
Originally Posted by Shaze View Post
cool it worked. what if I need to have a URL at the end of the redirect. code below, but i know it's wrong:

<?php
header('location:http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=98956-0000&PA='. $id'&HTML=http://www.site.com);
exit();
?>
'.$id.'&html=http://www.site.com');
__________________


TrafficCashGold Paying Webmasters Since 1996!

Awesome Conversions! Fast Weekly Payments! Over 125 Tours!
Adultnet is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-02-2008, 04:42 AM   #6
Adultnet
Confirmed User
 
Join Date: Sep 2003
Posts: 8,713
you can also make $id="yourid&html=http://www.site.com"
with this code:
<?php
header('http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=929876-0000&PA='. $id);
exit;
?>
__________________


TrafficCashGold Paying Webmasters Since 1996!

Awesome Conversions! Fast Weekly Payments! Over 125 Tours!
Adultnet is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-02-2008, 04:45 AM   #7
Shaze
Confirmed User
 
Join Date: Oct 2003
Location: Cyberspace
Posts: 2,662
Quote:
Originally Posted by Adultnet View Post
'.$id.'&html=http://www.site.com');
thank you very much! i suck at php
Shaze is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-02-2008, 04:53 AM   #8
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,229
you all fail. That code would rely on register_globals being on, which is off by default under php5.
<?php
$id = $_GET[id];
header('Location: http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=98956-0000&PA='.$id.'&HTML=http://www.site.com');
exit();
?>
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-02-2008, 05:13 AM   #9
polle54
Confirmed User
 
Join Date: Jul 2004
Location: The Beach
Posts: 4,626
Quote:
Originally Posted by k0nr4d View Post
you all fail. That code would rely on register_globals being on, which is off by default under php5.
<?php
$id = $_GET[id];
header('Location: http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=98956-0000&PA='.$id.'&HTML=http://www.site.com');
exit();
?>
Agreed... BUT you don't know he has to get ID by GET do you? and you forgot two quotation marks in your get.

Shaze Here is a example where it's a bit more split up.

You should really read http://w3schools.com/php/default.asp

It takes 30 minutes and will save you many many hours in the future.

<?php
$id = $_REQUEST["id"];
$urlstring = "http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=98956-0000&PA=".$id."&HTML=http://www.site.com";
header("Location: " . $urlstring);
exit();
?>
__________________
ICQ# 143561781

Last edited by polle54; 06-02-2008 at 05:14 AM..
polle54 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.