Jump to content

How do i put an Embed code on every page for users to add to their websites?


dunnsearch

Recommended Posts

I have a Music Search engine called DUNN tunes.

You can stream music true my flash player.

My player opens in a new php window.

Under the flash player in the php page i would like to show a embedded this song on your website/myspace.

It should be a iframe.

every page has a different url.

Every page could have a simple iframe and say above it embedded code.

Here is two pages two show you what the urls are like:

http://dunnsearch.mobi/listen.php?src=MP3Realm&name=U2-Exit.mp3&url=http://darrenrobbins.com/U2-Exit.mp3

And a different song with a different page

http://dunnsearch.mobi/listen.php?src=wrzuta&id=7JBEKHZzfa&name=Madcon%20-%20Beggin

The hight of the iframe should only show to logo and player, not the embedded code, and scrolling should be turned off.

Please help, as i think this will double my traffic. Thanks

Link to comment
Share on other sites

<textarea>Code</textarea>

 

or replace the < with

<

and the > with

>

 

theres a few ways depending on if you want them styled and things like that

 

Thanks

So far i have this:

<textarea><IFRAME SRC="" WIDTH=294 HEIGHT=75 SCROLLING=NO></IFRAME></textarea>

But what will i put in the SRC="" so it will display the page URL?

Link to comment
Share on other sites

If you're looking to insert the full URL of what page the user is on in the SRC attribute, you can use the following (credit to this guy via Google):

 

<?php
function selfURL() { 
$s = empty($_SERVER["HTTPS"]) ? '' 
: ($_SERVER["HTTPS"] == "on") ? "s" 
: ""; 
$protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s; 
$port = ($_SERVER["SERVER_PORT"] == "80") ? "" 
: (":".$_SERVER["SERVER_PORT"]); 
return $protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];
} 
function strleft($s1, $s2) { 
return substr($s1, 0, strpos($s1, $s2)); 
}
?>

Then call the function in the textarea.

<textarea><IFRAME SRC="<?php print(selfURL()); ?>" WIDTH=294 HEIGHT=75 SCROLLING=NO></IFRAME></textarea>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.