Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Newbie question: Include external files

Reply
Thread Tools

Newbie question: Include external files

 
 
Marsel
Guest
Posts: n/a
 
      10-12-2007
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=4 584& 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

 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      10-13-2007
On Fri, 12 Oct 2007 12:55:49 -0400, Marsel <> wrote, quoted or
indirectly quoted someone who said :

><?php
>include "http://mysite.com/ad.php?n=5&o=h&w=460&bgc=white&bc=lightgray&afid=4 584& 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.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
Reply With Quote
 
 
 
 
Marsel
Guest
Posts: n/a
 
      10-15-2007
On Sat, 13 Oct 2007 07:08:32 GMT, Roedy Green <(E-Mail Removed)> wrote:

>On Fri, 12 Oct 2007 12:55:49 -0400, Marsel <> wrote, quoted or
>indirectly quoted someone who said :
>
>><?php
>>include "http://mysite.com/ad.php?n=5&o=h&w=460&bgc=white&bc=lightgray&afid=4 584& 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.


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?

 
Reply With Quote
 
bbound@gmail.com
Guest
Posts: n/a
 
      10-15-2007
On Oct 15, 12:28 pm, Marsel <> wrote:
> 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.

 
Reply With Quote
 
Robert Larsen
Guest
Posts: n/a
 
      10-17-2007
Marsel wrote:
> <?php
> include "http://mysite.com/ad.php?n=5&o=h&w=460&bgc=white&bc=lightgray&afid=4 584& etc.etc...";
> ?>


WOW !!
Do you think you can get people to do that ??
They will have to trust you an awful lot.
 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      10-17-2007
Robert Larsen said the following on 10/17/2007 3:38 AM:
> Marsel wrote:
>> <?php
>> include "http://mysite.com/ad.php?n=5&o=h&w=460&bgc=white&bc=lightgray&afid=4 584& etc.etc...";
>> ?>

>
> 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

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/* #include <someyhing.h> */ => include it or do not include it?That is the question .... Andreas Bogenberger C Programming 3 02-22-2008 10:53 AM
Newbie question: Include external files Marsel Javascript 11 10-17-2007 07:38 AM
Create references to external scipt files from within an external script file Mellow Crow Javascript 6 11-04-2005 01:16 PM
Re: the use of #include <a_file.h> v/s #include"a_file.cpp" Rolf Magnus C++ 2 11-28-2003 12:26 PM
#include "bar" negates #include <string> ; how to fix? Danny Anderson C++ 5 08-15-2003 06:38 PM



Advertisments