Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 136,070 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,596 people online right now. Registration is fast and FREE... Join Now!




Parsing Includes

 
Reply to this topicStart new topic

Parsing Includes

Dr. Tim
7 Sep, 2002 - 10:18 AM
Post #1

D.I.C Addict
****

Joined: 20 Mar, 2002
Posts: 993

CODE

<?
if ($zip != "") {
// include the forecast
$forecast = include "http://english.wunderground.com/cgi-bin/findweather/getForecast?query=$zip";
// split it
$forecast = split ('[ <font size=+1><b>Personal Weather Stations</b></font> ]', $done);
echo "$done\n";
} else {
echo "You did not specify a zip code.";
}
?>


I only want to retrive the part after :

CODE

<font size=+1><b>Personal Weather Stations</b></font>


Help me please. smile.gif
User is offlineProfile CardPM
+Quote Post

Cookie Mobster
RE: Parsing Includes
7 Sep, 2002 - 12:38 PM
Post #2

nooneenooneenooonee
Group Icon

Joined: 12 Oct, 2001
Posts: 4,723


Dream Kudos: 18
My Contributions
In order for you to dump the contents of the include into a variable you have to have a return statement in the body of the included_file. You might want to look into the output_buffering functions to do it from a remote file. smile.gif
User is offlineProfile CardPM
+Quote Post

Dr. Tim
RE: Parsing Includes
7 Sep, 2002 - 03:51 PM
Post #3

D.I.C Addict
****

Joined: 20 Mar, 2002
Posts: 993

http://ps.flashages.com/showsource.php
User is offlineProfile CardPM
+Quote Post

Dr. Tim
RE: Parsing Includes
8 Sep, 2002 - 08:21 AM
Post #4

D.I.C Addict
****

Joined: 20 Mar, 2002
Posts: 993

smile.gif im looking into it... thanks sam
User is offlineProfile CardPM
+Quote Post

Dr. Tim
RE: Parsing Includes
8 Sep, 2002 - 08:22 AM
Post #5

D.I.C Addict
****

Joined: 20 Mar, 2002
Posts: 993

CODE
$fp=fopen($file, "w");
if($fp){
 set_file_buffer($fp, 0);
 fputs($fp, $output);
 fclose($fp);
}

Would that work?
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 07:06PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month