Jump to content

echo'ing php code ... havin a little trouble here ..


Recommended Posts

hello freaks

 

I have a DB that stored rss feeds, the feeds are stored in the variable RSS.

 

Here is what the feeds look like in the DB :

 

<?php readfile('http://rssifyme.com/rss.php?uid=rss_483edb7123786&rss[]=http%3A%2F%2Fwww.topix.com%2Frss%2Fsearch%2Farticle%3Fx%3D0%26y%3D0%26q%3D%2522solar%2Benergy%2522&rss[]=http%3A%2F%2Ffeeds.technorati.com%2Fsearch%2F%2522solar%2Benergy%2522%3Fauthority%3Da4%26language%3Den&rss[]=http%3A%2F%2Fblogsearch.google.com%2Fblogsearch_feeds%3Fhl%3Den%26scoring%3Dd%26q%3D%2522solar%2Benergy%2522%26ie%3Dutf-8%26num%3D10%26output%3Drss&number[]=5&number[]=3&number[]=3&width=490&ifbgcol=FFFFFF&bordercol=FFFFFF&textbgcol=FFFFFF&window=on&fontcol=000000&font=Tahoma&fontsize=14&href=228C32&href_h=42B754&title=on'); ?>

 

 

 

 

I am displaying it using this method :

 

<h2 class='boxtitle'>Current Code</h2>
<? print $rows['rss']; ?>

 

for some reason the above is actually printing the rss php feed, like its printing it after the page is parsed. How can i have it place that code before the page is parsed so it shs the rss feed ?

It's fine to do it that way, its even better to build it from the database but to each their own.

 

If it is actual php you are storing in the DB you want to look into www.php.net/eval

 

It can be a huge security flaw to use that, so use it wisely.

ok i switched up how i did it .. i took out the actual "php" code and jut left in the html href link ...

 

this is ho wI am trying to display it:

 

<?php readfile(' ' $rows['rss']' '); ?>

 

 

this is my error :

 

Parse error: syntax error, unexpected T_VARIABLE in /home/green/public_html/admin/editboxes.php on line 85

 

 

i m not sure whats going on ..

 

the $rows['rss'] is the url i need the readfile to display .

so basiclly what I am asking is ..

 

I have this stored in a database in the variable RSS :

 

<?php readfile('http://rssifyme.com/rss.php?uid=rss_483edb7123786&rss[]=http%3A%2F%2Fblogsearch.google.com%2Fblogsearch_feeds%3Fhl%3Den%26c2coff%3D1%26lr%3D%26safe%3Dactive%26scoring%3Dd%26q%3Dinposttitle%3Abiofuel%26ie%3Dutf-8%26num%3D10%26output%3Drss&rss[]=http%3A%2F%2Ffeeds.technorati.com%2Fsearch%2Fbiofuel%3Fauthority%3Da4%26language%3Den&rss[]=http%3A%2F%2Fwww.topix.net%2Frss%2Fsearch%2Farticle%3Fblogs%3D2%26submit%3DSearch%2BAll%2BTopics%26q%3Dbiofuel&number[]=4&number[]=4&number[]=3&width=490&ifbgcol=FFFFFF&bordercol=FFFFFF&textbgcol=FFFFFF&window=on&fontcol=000000&font=Tahoma&fontsize=14&href=339E43&href_h=42B754&title=on'); ?>

 

how can I echo that on a page using php .. not so the user cn see the php code but to where is actually executes that rss feed ?

 

 

 

Weird way of doing it. Instead store the URL in the database, and then use readfile() or something similar on the stored URL.

 

<?php
//$rows['rss'] = http://rssifyme.com/rss.php?uid=rss_483edb7123786&rss[]=http%3A%2F%2Fblogsearch.google.com%2Fblogsearch_feeds%3Fhl%3Den%26c2coff%3D1%26lr%3D%26safe%3Dactive%26scoring%3Dd%26q%3Dinposttitle%3Abiofuel%26ie%3Dutf-8%26num%3D10%26output%3Drss&rss[]=http%3A%2F%2Ffeeds.technorati.com%2Fsearch%2Fbiofuel%3Fauthority%3Da4%26language%3Den&rss[]=http%3A%2F%2Fwww.topix.net%2Frss%2Fsearch%2Farticle%3Fblogs%3D2%26submit%3DSearch%2BAll%2BTopics%26q%3Dbiofuel&number[]=4&number[]=4&number[]=3&width=490&ifbgcol=FFFFFF&bordercol=FFFFFF&textbgcol=FFFFFF&window=on&fontcol=000000&font=Tahoma&fontsize=14&href=339E43&href_h=42B754&title=on
readfile($rows['rss']);
?>

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.