PHP help needed - small job rep only

Namecheap AuctionsNamecheap Auctions
Spacemail by SpaceshipSpacemail by Spaceship
SpaceshipSpaceship
Watch
Status
Not open for further replies.

simonj

Established Member
Impact
15
I need someone who is familiar with PHP to insert my affiliate code in a PHP page. I'm sure it's easily done but i don't know the correct syntax (i've tried it doesnt' work). Can someone plese lend a hand?

thanks
Simon
 
Last edited:
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
save as youraffiliatesite.php
PHP:
<?php $URL="http://youraffiliateurl.com/";
header ("Location: $URL");
exit();
?>
 
0
Close
Thanks, but not quite what I had in mind. The page returns variables, which I need to incorporate into my affilliate link. Weblord if you want to take a look PM me, or if someone else can have a crack please let me know.

thanks
Simon

heh you can probably get an idea as to what I want by looking at teh site in my sig
 
0
Close
without having code or that php-page its hard

but maybe something like this

PHP:
?>

put here your affiliate code

<?php

.
 
0
Close
Hello,
I m interested.
Please send me exact details of the work.
My Contact Details :
MSN : [email protected]
Gmail : [email protected]
I m looking forward to work with you.
 
0
Close
the line I'm having trouble with;

$mystring='<ahref="http://affiliates.moniker.com/pub/Affiliates?affiliate_id=2328&landingpage=domaincheck&domain='.$prop;

$prop is a variable that needs appending to the end of the url, but how do I finish off the $mystring to include $prop</a> (the display text for the url)


any ideas?

thanks
Simon

ok half way there lol! got it working but it won't display in the textbox, it just displays the html instead of parsing it. sigh (got it running correctly at the bottom of the page though...WOOT! )
 
0
Close
PHP:
<?php
$mystring = "<a href='http://affiliates.moniker.com/pub/Affiliates?affiliate_id=2328&landingpage=domaincheck&domain="  . $prop . "</a>";
echo $mystring;
?>
 
0
Close
A corrected version of -Nick-'s code from above; which didn't end the <a> tag before closing it.

PHP:
<?php
$mystring = "<a href='http://affiliates.moniker.com/pub/Affiliates?affiliate_id=2328&landingpage=domaincheck&domain=".$prop."'>Anchor Text</a>";
echo $mystring;
?>
 
0
Close
0
Close
zoki:

PHP:
  <?php
$mystring = "<a href='http://affiliates.moniker.com/pub/Affiliates?affiliate_id=2328&landingpage=domaincheck&domain="  . $prop . "</a>";
echo $mystring;
?>
The above code would output (where $prop is an actual value):

<a href='http://affiliates.moniker.com/pub/Affiliates?affiliate_id=2328&landingpage=domaincheck&domain=$prop</a>
This would not be a proper tag as the opening <a> tag is not closed itself. Thus my small (very, very small) correction:

PHP:
  <?php
$mystring = "<a href='http://affiliates.moniker.com/pub/Affiliates?affiliate_id=2328&landingpage=domaincheck&domain=".$prop."'>Anchor Text</a>";
echo $mystring;
?>
 
Last edited:
0
Close
Phoenix: you are right :tu: havent seen that :(


.
 
0
Close
Thanks everyone, this is what I eventually came up with, which I'm kind of proud of as I have no PHP knowlege at all!

PHP:
$mystring='<a href="http://affiliates.moniker.com/pub/Affiliates?affiliate_id=2328&landingpage=domaincheck&domain='.$prop;
$moniker=$mystring.'">'.$prop.'</a>';

cheers,
Simon
 
0
Close
Phoenix Thanks I think I missed out that " in end :D
 
0
Close
Status
Not open for further replies.
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back