Bigbruin.com
Home :: Reviews & Articles ::
Forum :: Info :: :: Facebook :: Youtube :: RSS Feed
Search  :: Register :: Log in
PHP help - including variables from separate file
Go To Page Previous  1, 2
Post new topic   Reply to topic    Bigbruin.com Forum Index -> Software
View previous topic :: View next topic  
Author Message
IceNine
*The Freshest*


Joined: 08 Sep 2003
Posts: 1459
Location: Bel Air

PostPosted: Tue, 21 Dec 2004 15:41:00    Post Subject: Reply with quote View Single Post

Code:
$html_content = file_get_contents('example.html');
preg_match("/<title>(.*)<\/title>/i", $html_content, $match);
$title = $match[0];


That should work for you.

_________________

A letter to a soldier
Back to top
View user's profile Send private message
Little Bruin
Boo Boo

Joined: 07 Apr 2003
Posts: 667
Location: Pic-A-Nic Basket
Doctor Feelgood
Arrrrghh!


Joined: 07 Apr 2003
Posts: 20349
Location: New Jersey

PostPosted: Tue, 21 Dec 2004 16:26:13    Post Subject: Reply with quote View Single Post

Bang Head

Meh, I give up.

Anyone Wink wanna build an article system? I had a good idea (I thought), but my inability to get past this little speed bump has shown me the light... Laughing
Back to top
View user's profile Send private message Visit poster's website
IceNine
*The Freshest*


Joined: 08 Sep 2003
Posts: 1459
Location: Bel Air

PostPosted: Tue, 21 Dec 2004 16:32:08    Post Subject: Reply with quote View Single Post

I will, if you like. I'm bored as it is at work. Razz Also, I'm about 300x better at PHP/MySQL than I was before. If you have mod_rewrite, I can even make the urls look pretty:

http://www.bigbruin.com/article/monkey.html

_________________

A letter to a soldier
Back to top
View user's profile Send private message
Doctor Feelgood
Arrrrghh!


Joined: 07 Apr 2003
Posts: 20349
Location: New Jersey

PostPosted: Tue, 21 Dec 2004 16:36:45    Post Subject: Reply with quote View Single Post

I think mod rewrite is on... and is what creates the forum archive:

http://www.bigbruin.com/forum/archive
Back to top
View user's profile Send private message Visit poster's website
IceNine
*The Freshest*


Joined: 08 Sep 2003
Posts: 1459
Location: Bel Air

PostPosted: Tue, 21 Dec 2004 18:15:34    Post Subject: Reply with quote View Single Post

What would you like to see? What are your requirements?
_________________

A letter to a soldier
Back to top
View user's profile Send private message
Doctor Feelgood
Arrrrghh!


Joined: 07 Apr 2003
Posts: 20349
Location: New Jersey

PostPosted: Fri, 04 Mar 2005 22:19:46    Post Subject: Reply with quote View Single Post

Call me dense, but I still never got this to work!

What I really want is to have a universal index.php file for all reviews/articles to based from. I already have it set to include the body of the reviews. What I need to do is have it grab a set of variables for the header (author, posted date, sponsor, manufacturer, thread link). I want the review body text file to have a list of these variables that the index.php can grab.

Make sense? I hope its possible... and easy enough for a noob to understand!!
Back to top
View user's profile Send private message Visit poster's website
IceNine
*The Freshest*


Joined: 08 Sep 2003
Posts: 1459
Location: Bel Air

PostPosted: Tue, 15 Mar 2005 20:12:16    Post Subject: Reply with quote View Single Post

How about something like this:

article_about_a_usb_drive.php:
Code:

$author = 'I. M. Cool';
$date = '03-12-2005';
$sponsor = 'Yourmama.com';
$manu = 'BBtech.com';
$link = 'forum.php....whatever';
$text = '<p>blah</p>';


Then use those variables within the article index...

_________________

A letter to a soldier
Back to top
View user's profile Send private message
Little Bruin
Boo Boo

Joined: 07 Apr 2003
Posts: 667
Location: Pic-A-Nic Basket
Display posts from previous:   
Post new topic   Reply to topic    Bigbruin.com Forum Index -> Software All times are GMT - 4 Hours
Go To Page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Contact Us :: On Facebook :: On Youtube :: Newsletter :: RSS Feed :: FAQ :: Links :: Sponsors :: Privacy Policy
Copyright © 2000 - 2023 Bigbruin.com - All rights reserved