php and CGI?
I have a good image hosting website but i want to integrate a good banner advertising system that has been writen in CGI. Can i call the cgi program within a php page and still give the page a .php extension.
I have a good image hosting website but i want to integrate a good banner advertising system that has been writen in CGI. Can i call the cgi program within a php page and still give the page a .php extension.
Greg K posted this at 21:24 — 31st August 2005.
He has: 2,145 posts
Joined: Nov 2003
I've never done this myself, so this would all be trial and error.
Try using the system (http://us3.php.net/manual/en/function.system.php) command to execute the cgi.
Another thought, if you really needed to, use curl (http://us3.php.net/curl) to access the cgi script. I have written code to do this before.
But I must say, and this depends on your needs, if at all possible, switch to a PHP based ad program. We use phpAdsNew (http://sourceforge.net/projects/phpadsnew) and like it. We don't use nearly all of the features it offers, it can do so much.
-Greg
benf posted this at 08:45 — 1st September 2005.
They have: 426 posts
Joined: Feb 2005
Thanks greg, have heard of this phpadsnew. Will give it a try. The links are interesting.
02bunced posted this at 09:16 — 1st September 2005.
He has: 412 posts
Joined: May 2005
Just be aware that system doesn't work on all hosting packages, it depends how PHP is configured.
David
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.