Newbie question: Include external files

M

Marsel

OK, first off I admit I don't have clue about JAVA. I am a newbie noknow :)

I want to launch an affiliate program, where publishers can include configurable feed from my site.

Generation of the code in PHP is done, so publishers could simply ad

<?php
include "http://mysite.com/ad.php?n=5&o=h&w=460&bgc=white&bc=lightgray&afid=4584& etc.etc...";
?>

to their code. Of course this only works for PHP publishers. ASP cannot handle external includes (so I am told), and I
would also hate to rule out HTML pages.

So, is there a (simple) way to solve this with JAVA? I would appreciate any help to point me in the right direction.

Thanks,
Marsel
 
R

Roedy Green

<?php
include "http://mysite.com/ad.php?n=5&o=h&w=460&bgc=white&bc=lightgray&afid=4584& etc.etc...";
?>

to their code. Of course this only works for PHP publishers. ASP cannot handle external includes (so I am told), and I
would also hate to rule out HTML pages.

So, is there a (simple) way to solve this with JAVA? I would appreciate any help to point me in the right direction.

You can embed links in HTML, or Java Applets or Servlets. However,
bald PHP code itself is not going to be any use inside a Java
program.

To make it useful, you would need to create a C++ wrapper around your
code, and JNI glue so that you could use your PHP api from Java.

See http://mindprod.com/jgloss/jni.html

That is fairly tricky. You need someone who understands PHP, C++,
Java and JNI.
 
M

Marsel

You can embed links in HTML, or Java Applets or Servlets. However,
bald PHP code itself is not going to be any use inside a Java
program.

To make it useful, you would need to create a C++ wrapper around your
code, and JNI glue so that you could use your PHP api from Java.

See http://mindprod.com/jgloss/jni.html

That is fairly tricky. You need someone who understands PHP, C++,
Java and JNI.

Thanks.

Maybe I was not clear. I just want the file http://mysite.com/ad.php to be called with certain arguments and included on
the affiliate's site.

I am currently doing it with IFRAME. Do I really need C++, Java, and JNI? If yes, do you know who might do the
programming?
 
B

bbound

I just want the filehttp://mysite.com/ad.phpto be called with certain arguments and included on
the affiliate's site.

Ugh!!

Well, in THAT case, I have new advice for you: go to hell. Go directly
to hell, do not pass Go, do not collect 200 click-thrus, you miserable
spammer.
I am currently doing it with IFRAME. Do I really need C++, Java, and JNI? If yes, do you know who might do the
programming?

No, all you need is your head soaking, preferably in something less
harmless than water.

Not only do you mean to bombard innocent web surfers with nasty popups
or other evil, intrusive, obnoxious advertising (else you'd be
satisfied with a plain 460x60 .jpg file on the other site rather than
a php file), but you actually want to run arbitrary code on other
peoples' sites, which will constitute a security hazard for these
sites and everyone who surfs to any of them.

There's no good reason for an advertiser to want to run custom code on
someone else's site. The only point in doing so is to do something
nefarious, such as make the ad scribble outside of its html element
and cover up the content nearby, or dance and play annoying sounds, or
load synchronously so if your ad server is slow surfers have to wait
for the stupid ad to load before reading on, rather than if your ad
server is slow then *you* end up with ineffective ads because people
will have scrolled past before they managed to load, or ...

Go away, buzzard. Nobody wants evil spammers around here.
 
R

Randy Webb

Robert Larsen said the following on 10/17/2007 3:38 AM:
WOW !!
Do you think you can get people to do that ??
They will have to trust you an awful lot.

Only if you equate stupid and trust :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,152
Latest member
LorettaGur
Top