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 12-21-2007, 02:11 AM   #1
Sony
Confirmed User
 
Industry Role:
Join Date: Dec 2002
Posts: 495
Programmers I pay $10 epassporte for a very simple script!

Here is an example of what I want:

http://www.ronisparadise.net/fhg/gal...hp?user=XXXXXX

I need made a php file which will change the affiliate code inside a gallery accoring the change made in the URL.

e.g If I replace the XXXXXX in the URL with 234122 then all links in the gallery will have the XXXXXX replaced with 234122

http://www.ronisparadise.net/fhg/gal...hp?user=234122

ICQ: 171739496
Sony is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-21-2007, 02:13 AM   #2
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,231
hitting you up on icq
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-21-2007, 02:16 AM   #3
V_RocKs
Damn Right I Kiss Ass!
 
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,428
Make sure it sanitizes that input too.
V_RocKs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-21-2007, 02:17 AM   #4
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
Code:
<?php
$id = $_GET['id'];
$stuff = file_get_contents("template.txt");
$html = str_replace("123456",$id,$stuff);
echo $html;
?>
save that as index.php

save all your html in a file called template.txt with refcode as 123456

then just call the index.php like index.php?id=5551212
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-21-2007, 02:18 AM   #5
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
yes i suppose you might wanna santatize it a bit
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-21-2007, 02:22 AM   #6
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,231
Quote:
Originally Posted by SmokeyTheBear View Post
Code:
<?php
$id = $_GET['id'];
$stuff = file_get_contents("template.txt");
$html = str_replace("123456",$id,$stuff);
echo $html;
?>
save that as index.php

save all your html in a file called template.txt with refcode as 123456

then just call the index.php like index.php?id=5551212
For what he needs, <? echo strip_tags($_REQUEST['user']) ; ?> right in the gallery is plenty. No point reading in another file...
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-21-2007, 02:27 AM   #7
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
Quote:
Originally Posted by k0nr4d View Post
For what he needs, <? echo strip_tags($_REQUEST['user']) ; ?> right in the gallery is plenty. No point reading in another file...
true but if he has alot of places to change it would be shorter is all i was thinking
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-21-2007, 02:30 AM   #8
Sony
Confirmed User
 
Industry Role:
Join Date: Dec 2002
Posts: 495
Quote:
Originally Posted by k0nr4d View Post
hitting you up on icq
Thanks Smokey for input, but I choosed to use k0nr4d code since is a bit easier. He sent me the code on ICQ and he didn't wanted to take my money Thank you again mate!
Sony is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-21-2007, 02:32 AM   #9
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,231
Quote:
Originally Posted by SmokeyTheBear View Post
true but if he has alot of places to change it would be shorter is all i was thinking
ahh yes didn't think of that.
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-21-2007, 03:15 AM   #10
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
Quote:
Originally Posted by Sony View Post
Thanks Smokey for input, but I choosed to use k0nr4d code since is a bit easier. He sent me the code on ICQ and he didn't wanted to take my money Thank you again mate!
no probs. i suggets always asking first , lots of people still dont mind helping for free. then if you need more customization you have a few choices based on answers. ( and for others who might also want the same thing and for reference )



p.s. if you want to have se friendly urls you could use his code with the following
( assuming there are no asp pages in the directory )

save this as .htaccess and upload to the same directory
Code:
RewriteEngine on
 RewriteRule ^(.*)\.asp index.php?user=$1 [nc]
this way you can call your pages like
http://yoursite.com/stuff/refcode.asp
and it will turn into
http://yoursite.com/stuff/index.php?user=refcode
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-21-2007, 03:58 AM   #11
rowan
Too lazy to set a custom title
 
Join Date: Mar 2002
Location: Australia
Posts: 17,393
Quote:
Originally Posted by k0nr4d View Post
For what he needs, <? echo strip_tags($_REQUEST['user']) ; ?> right in the gallery is plenty. No point reading in another file...
If the ID consists of digits only then you can force it to an integer by adding it to a number:

<?php echo (0 + $_REQUEST["user"]); ?>
rowan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-21-2007, 06:19 AM   #12
Iron Fist
Too lazy to set a custom title
 
Join Date: Dec 2006
Posts: 23,400
Good thread
__________________
i like waffles
Iron Fist 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.