Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 27th, 2000, 01:31 AM
bel_dan bel_dan is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 3 bel_dan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hey,

I am trying to get php to run a cgi script for me and capture the output and echo that back to the screen. Does anyone have any idea how to do this?

Thanx,
Big Din K.R.

Reply With Quote
  #2  
Old June 27th, 2000, 01:52 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
>>capture the output and echo that back to the screen
Try fopen.
Note, your Perl script must accept GET method.

If you do the other way around or both scripts are in Perl, you can use POST method as well.

Reply With Quote
  #3  
Old June 27th, 2000, 02:16 AM
bel_dan bel_dan is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 3 bel_dan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by freebsd:
>>capture the output and echo that back to the screen
Try fopen.
Note, your Perl script must accept GET method.

If you do the other way around or both scripts are in Perl, you can use POST method as well.
[/quote]

Here is what I was using before...

popen("newsblocks/geeknews/geeknews.cgi", "r");

Changing to fopen sounds easy, but where or how do I the GET reference?

Thanx for the feedback as well.
Big Din K.R.

Reply With Quote
  #4  
Old June 27th, 2000, 02:10 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
>>Changing to fopen sounds easy

Okay.

>>but where or how do I the GET reference?

That has to do with your Perl script. If you type the http://www.fullurl.com/to/newsblocks/geeknews/geeknews.cgi to the location box of your browser and get the output of your Perl script, then that's fine. That means your Perl script accepts GET method.


Reply With Quote
  #5  
Old June 28th, 2000, 02:54 AM
bel_dan bel_dan is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 3 bel_dan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hey FreeBSD,

Thanx for the info. The script does work in that fashion. I was just trying to call it as an include. Found out very fast that all it want's to do in that particular case is just display the script itself. Not good.

Thanx again,
bel_dan@linuxrookies.net

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > PHP and perl

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap