Jump to content

php can do anything:O


receiver

Recommended Posts

Hello!

 

I need an alternative to <script type='text/javascript' src='http://www.domeen.com/mydisplay.php'></script>  (this displays the site mydisplay.php on other domains) :)

 

I know its possible to do with php. I just need that the mydisplay.php(from my domain) is displayed on the other domain as its own real page content, this means whatever the mydisplay shows its no different from other domains content....

 

if there is better way let me pllsss know;)

 

the purpose is to display backlinks that works with search engines.

 

 

Thank you!

Link to comment
Share on other sites

echo $PageContents = filegetcontents("http://www.thesite.com/thepage.php");

 

Returns the content as-is which means that if you output it the PHP code will be visible in the HTML source. It obviously needs to be include('http://www.thesite.com/thepage.php'); (with allow_url_fopen, PHP is parsed on the server) or better yet include('thepage.php"); (PHP is parsed on your server) which will parse the PHP.

Link to comment
Share on other sites

echo $PageContents = filegetcontents("http://www.thesite.com/thepage.php");

 

Returns the content as-is which means that if you output it the PHP code will be visible in the HTML source.

 

No it won't. It will return the output produced by the php being parsed on the server because you are requesting the file via http. If it where a local file requested via the file system you would get the php source.

Link to comment
Share on other sites

ok i  can use 2 methods:

 

<?php $PageContents = file_get_contents("http://www.site.com/page.php"); 
echo("$PageContents"); 
?>
<?php include('http://www.site.com/page.php'); ?>

 

they work nicely in php document.:D thank you

 

now what i need is to get these codes to work in html and all other page types:

 

I can create .htaccess <Files page.html>

AddType application/x-httpd-php .html

</Files>

so this .htaccess makes it to work in html.

(this does not work for me because i need simple code that works anywhere)  just by copy paste.

 

Is there any other way? :P

 

Thank you!

 

Link to comment
Share on other sites

ok! can't do the easy way. but php and html are the most used right?

whats the 3-d most used page type?

and btw you cant show this code on platforms like blogger etc or can you include the .htaccess document or command and will it work?

 

thank you!

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.