/    Sign up×
Community /Pin to ProfileBookmark

Adbeans propose insertion of ads but at what expense ?

I was interested in getting some ads placed on my site as I had been approached by adbeans.com I was shocked to learn that that they require to submit the code in a php format or similar dangerous practise, here is the code

[CODE]<?php
$old = @ini_set(‘default_socket_timeout’, 3); @set_time_limit(3);
$DN =””; if(isset($_SERVER[‘SERVER_NAME’])){$DN = $_SERVER[‘SERVER_NAME’];}
$CIP =””; if(isset($_SERVER[‘REMOTE_ADDR’])){$CIP = $_SERVER[‘REMOTE_ADDR’];}
$PU = “”; $PU = $_SERVER[‘PHP_SELF’]; $S=”?”;foreach($_GET as $var => $val){$PU .= $S.$var.”=”.$val; $S=”~”;}
$FP = @fopen(“http://dlaserv.com/RequestFormattedAds.aspx?domainname=$DN&VisitorIP=$CIP&ref=adbeans&PageUrl=$PU”, “r”);
$PG =””;while ($TX = @fread($FP, 100)) {$PG .= $TX;}
@ini_set(‘default_socket_timeout’, $old);
echo(“$PG”); ?>[/CODE]

Isn’t this crazy to put this on my site ? I won’t be doing it until I learn if it is ok.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogAug 21.2009 — It's going to send them your domain name, the IP address of the user requesting the page on your site, and the full URI of that request. It will then echo some text returned from their site. As to whether it is "crazy", that mainly depends on how much you trust them to not return something that you do not want displayed on your page, and also how much you're willing to provide them that info: your domain (seems like no biggie), user's IP (how does this fit with your privacy policy?), full URI of your page (do you care if they have this info?).

Also, the supplied code will only work if the PHP all_url_fopen configuration setting is enabled. If not, you would probably have to use the cURL functions.
Copy linkTweet thisAlerts:
@mojitoauthorAug 24.2009 — Thanks for your reply, I might give it a try then, apparently they can be trusted by some end clients bigger than me.
×

Success!

Help @mojito spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.13,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...