PDA

View Full Version : How to show html from a js script



weilies
10-03-2007, 06:46 AM
hi, everyone know that google using



<script type="text/javascript"><!--
google_ad_client = "";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel = "";
//-->

<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

to display the ads. And the view source actually see nothing of the ads code but jz same like above. Anyone know how to do tht? i tried to search from net but seems like cant get my answer. I even try to download the google's JS code. But... it seems too difficult to me. Can anyone provide me a sample on how to do tht?


Thanks for helping

codeexploiter
10-03-2007, 07:32 AM
https://www.google.com/adsense/support/bin/topic.py?topic=8437

weilies
10-03-2007, 12:21 PM
Oh, sorry, i am not asking how to put adsense code, :)

i am asking how to apply this technique in my website.

Eg.

user may paste

<script type="text/javascript"><!--
... my parameter
//-->

<script type="text/javascript"
src="http://mydomain.com/my_javascript_.js">
</script>

And their site will show my website content. It's hopefully not an RSS, XML remote fetch, but a google adsense approach (include a JS script and can get the content)

Thanks

tech_support
10-05-2007, 09:06 AM
You could use JavaScript + PHP to get your page contents.

weilies
10-05-2007, 11:49 PM
:(, cannot. coz some of the member grabbing my JS code may not running a PHP site, but ASP, JSP etc

djr33
10-06-2007, 12:21 AM
You want to not use PHP in order to have people steal your code?

Explain...

weilies
10-06-2007, 01:22 AM
no, actually the story is like this...

I need to create a banner rotator engine for public.
1. signup
2. login > banner management
3. copy ads code from other affiliate network, paste into my system
4. set the ratio for each banner (E.g. they put 5 banners into the panel)
5. press 'submit' button.
6. my portal will generate a CODE (this is wht i need, something like google ads)


<script type="text/javascript"><!--
mymember_id = 123
mymember_rotator_code = 123abc
//-->

<script type="text/javascript"
src="http://mydomain.com/my_javascript_.js">
</script>
7. the member just paste my code into their website, and once visitor come to their site, it will trigger my JS code. and their banner will be loaded ACCORDING to the ratio they site in my website

P.S. the reason i need a JS is bcoz some of them may not running a PHP site. But ASP, ASP.NET, Perl site. So i think JS is a bit universal for them.

Story end. Thanks for helping