Forum Moderators: coopster

Message Too Old, No Replies

cURL perl script into php template/script

esp. previous/next query statements

         

divaone

10:13 pm on Oct 27, 2003 (gmt 0)

10+ Year Member



if anyone can help i would really appreciate the feedback. please forgive errors in wording.

my main site script reads:
if($value=='directory')
INCLUDE "$value/index.php";
so [domain.com...]

each index.php (or whatever.php) page includes a header and footer.

i have a perl comments script which spans results across several pages, 5 entries per page. its url would be:
[domain.com...] the script allows me the option of including my own header and footer, but i would much rather curl this script into my php pages so there are no duplicate headers and footers across the site to edit.

my current php reads:
$RETRIEVE_URL = "http://domain.com/cgi-bin/perlscript.cgi?".$_SERVER["QUERY_STRING"];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$RETRIEVE_URL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$result=curl_exec ($ch);
curl_close ($ch);
echo $result;

calls the script well but now i do not understand how to grab the next and previous page links from/into/with
[domain.com...]
the above itself is probably not even coded correctly and i am simply not getting the examples from php.net.

thank you for any help!

divaone

9:48 pm on Oct 28, 2003 (gmt 0)

10+ Year Member



*bump* any clues on this one? again, thanks!

jatar_k

9:54 pm on Oct 28, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I figure the question is difficult to answer because there isn't quite enough info.

how to grab the next and previous page links

where do they come from?
the perl script?
Does the perl script return this info?
Does php already have access to enough info to build the next/previous?
If not where can you get this info from (perl or php)?
Can you pass different params to the perl script to get the next set of records?
If so, then you just need to code links that have the proper params attached to get the next records.