Jump to content

mikey.rr

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mikey.rr's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Oh wow I'm stupid. I just had to do this: <script type="text/javascript"> <!-- window.location = "?act=index" //--> </script> But how would I be able to delay that a few seconds?
  2. Well, I'm making a CMS...and I started on it today. I have the very basic member login system down...but I have a little problem. How do I make a page redirect? Not with the header thing either... My examples: This is if someone enters 'index.php'. It will automatically, and hopefully instantly, redirect them to 'index.php?act=index'. elseif(empty($act)) { //somehow redirect to index.php?act=index here } And this is in the login validation file... If they login correctly, it sets a session variable to 1, meaning you are logged in throughout the site. Then, it redirects them back to index.php?act=index. But I can't figure out how to do that either... } else { $_SESSION['logged_in'] = '1'; $_SESSION['username'] = $username; echo 'Thank you for logging in, '.$username; echo "<br /><b><font size='2'><a href='?act=index'>Click here to return to the index</a></font></b>"; //I'd like to replace the above line with the redirect } Help please?
  3. I did phpinfo(); and it says the path to my php.ini file is '/usr/local/Zend/etc/php.ini' but i went into cPanel and under file manager there is no /usr folder....
  4. Ugh. I tried it on my FreeHostia account which has php 5..but i got this error: Warning: fopen(http://google.com) [function.fopen]: failed to open stream: No route to host in /home/www/gdsweather.freehostia.com/cnn2.php on line 2 Which lead to more errors.
  5. Fatal error: Call to undefined function: stream_get_contents() in public_html/mikey/news/cnn2.php on line 3 ?? This is my code: <?php $h = fopen("http://www.cnn.com","r"); $c = stream_get_contents($h); fclose($h); //... //Run some RegEx on $c to pull out the bits you want... //... echo $c; ?>
  6. that wasn't really what I was looking for...i want to take the text from the link within the rss go to that link i posted, it has a bunch of links to CNN sites. i want to take data from THAT site
  7. Well, I was thinking about making a news script. Sort of like a CMS, but it will just see data from an RSS feed, go to the link, and rip the news text and title off the page and display it. I don't know if this is even possible. My example: Use MagPieRSS to display CNN's Top Stories RSS (link) If there's an update to the RSS, *somehow* it will get data from the CNN News page (news text, and the title) and display it in a page like "cnn.php?article_id=1". Is this even possible? Or do you have a suggestion about a better way to do this? If I'm not clear, just say so and I'll try to clarify. Oh and by the way, I'd consider myself an intermediate-advanced coder.
×
×
  • 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.