htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Sending POST or GET Data in the background with curl
PostPosted: 13 Mar 2007 22:05 
Offline

Joined: 23 Oct 2006 23:09
Posts: 4
You can silently post variables like this:

Create a file /dothis.php with contents
Code:
<?php
    $ch = curl_init('http://mysite.com/index.php');
    curl_setopt ($ch, CURLOPT_POST, 1);
    curl_setopt ($ch, CURLOPT_POSTFIELDS, "option=com_content&task=blogcategory&id=24&Itemid=55");
    curl_exec ($ch);
    curl_close ($ch);
?>

or to use GET instead of POST
Code:
<?php
    $ch = curl_init('http://www.mysite.com/index.php?option=com_content&task=blogcategory&id=24&Itemid=55');
    curl_exec ($ch);
    curl_close ($ch);
?>


Then in your .htaccess file do this
Code:
RewriteEngine On
RewriteBase /
RewriteRule ^thispage$ /dothis.php



But the solution in the post above this does the same thing..

Sending POST form data with php CURL


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB