Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Help with PHP includes

Help with PHP includes
Thread Tools
Mac Enthusiast
Join Date: Sep 2000
Location: Somewhere
Status: Offline
Reply With Quote
Dec 24, 2001, 04:35 PM
 
Using either CGI (perl) or PHP, I need to include the second table and the second table only from another dynamically generated page. The page is on another server, so I'm currently using a
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>&lt;?php include(<font color = red>"http://mydomain.myserver.tld/mypage.cgi"</font>&gt;</font>[/code]
to get and include the page before it's served. However, things would look much nicer if I could simply take the second table off of the page and include only what is between the second set of &lt;table&gt;&lt;/table&gt; tags.

I know there must be a way of doing this, however, my PHP and perl skills are lousy, can anyone help me?

Thanks.
     
Administrator
Join Date: May 2000
Location: California
Status: Offline
Reply With Quote
Dec 25, 2001, 12:15 AM
 
If you control the other server, make it save the 2nd table as a separate file. Then you can include that remote file.

Otherwise, make a parse routine that grabs the other page and clips it down to the 2nd table. Save the distilled table as a local file. You can cron the parse routine as often as needed, so your own page will always have a current copy of the 2nd table available.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:43 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2