By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,724 Members | 1,655 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,724 IT Pros & Developers. It's quick & easy.

external HTML code in all websites

P: 5
Hello everybody,

so i need some hints where to start at...

i want to create website, which generates some text, for example everyday this text will be diffrent... and i need to provide some code to everyone who wants use this text in their own websites... essence is that this text must be inlined in other websites in some way like PURE HTML and search engines would be able to index this text!!! so i can't use <iframe src='http://someaddress.com/mypagewithtext.aspx'>, i can't use any javascript too, becouse everything that is inside <script> tags woun't be indexed by search engines....

i need server side scipting in this case yeah? and i need some diffrent versions of code (which get my generated text in some way) for php, asp.net, jsp an etc.

i have tried to do soomething like this: i generate some xml, and this xml is on my server, this xml i can renew without any troubles.... also i provide some short code fragments (php, asp.net, jsp) which reads that xml on my server, but i encoutered with security problem, becouse let's say most php servers is configured to deny remote file access, so i can't do something like (fopen('http://someaddress.com/mypagewithtext.aspx', r)).... :( and i can't expect from everyone whou wants use my code to change server settings...

maby exists some excelent solution for my problem and i can't find it???

thanks
Jan 5 '08 #1
Share this Question
Share on Google+
6 Replies


P: 1
Hello Sir/Madam,

I have solution of your Problem.

1.if u change ur text then use Time check in asp page that display ur text differently and take ur test from database.
2.if u give ur URL then you use Ur database file connection url.
3.One solution is this u generate time check code and type static text in a seperate file and folder.And give you file source to others to use in their own website.
For further information Contact me.

thankx
Jan 6 '08 #2

pbmods
Expert 5K+
P: 5,821
Heya, Ambeer.

What server-side language do you typically work with?
Jan 6 '08 #3

P: 32
for php you can use something similar to this

[PHP]$xml = simplexml_load_file("http://www.myserver.com/wow.xml");
foreach ($xml->thing as $thing) {
echo "<p>" . $thing . "</p>";
}[/PHP]


XML file
[HTML]<xml>
<thing>im a thing</thing>
<thing>im another thing</thing>
<thing>im a third thing</thing>
</xml>[/HTML]


Im sure there are other functions or libraries in other languages.
Jan 7 '08 #4

P: 5
for php you can use something similar to this

[PHP]$xml = simplexml_load_file("http://www.myserver.com/wow.xml");
foreach ($xml->thing as $thing) {
echo "<p>" . $thing . "</p>";
}[/PHP]


XML file
[HTML]<xml>
<thing>im a thing</thing>
<thing>im another thing</thing>
<thing>im a third thing</thing>
</xml>[/HTML]


Im sure there are other functions or libraries in other languages.
like i have noteced before


have tried to do soomething like this: i generate some xml, and this xml is on my server, this xml i can renew without any troubles.... also i provide some short code fragments (php, asp.net, jsp) which reads that xml on my server, but i encoutered with security problem, becouse let's say most php servers is configured to deny remote file access, so i can't do something like (fopen('http://someaddress.com/mypagewithtext.aspx', r)).... :(

it's the same problem with simplexml_load_file(url)
Jan 7 '08 #5

P: 5
Heya, Ambeer.

What server-side language do you typically work with?
webpage which generates text i want to write with asp.net 2.0 but it doesn't matter yes?

That generated text access and display as html must be able by php, jsp, asp.net etc...
Jan 7 '08 #6

P: 26
In PHP you can use fsockopen instead of fopen. This works even when allow_url_fopen is disabled. You setup a connection write the headers, then you can use the file handle with fread functions if you want.

Example #1 on this page should be all you need http://us.php.net/manual/en/function.fsockopen.php to do it on PHP.

This probably isn't the forum for this question. You should repeat the question in ASP and JSP forums to get answers in those two languages.
Jan 7 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.