<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[More PFSESNE collect the DCHP table]]></title><description><![CDATA[<p dir="auto">I have six PFSENSE I hope to integrate the DHCP form<br />
May I ask how you want to use a CURL login PFSESEN to the DCHP page?<br />
Thank you</p>
]]></description><link>https://forum.netgate.com/topic/61713/more-pfsesne-collect-the-dchp-table</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Apr 2026 10:52:12 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/61713.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 15 Oct 2013 09:27:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to More PFSESNE collect the DCHP table on Thu, 17 Oct 2013 08:36:10 GMT]]></title><description><![CDATA[<p dir="auto">i try edit code like this<br />
still ERROR  :(</p>
<pre><code>
// http://000.000.000.000
// usernamefld   admin
// passwordfld   #00000@0#

$form_vars = array();

$username = 'admin';
$password = '#00000@0#';
$loginUrl = 'http://172.30.34.254/index.php';
$postUrl='http://172.30.34.254/index.php';
$user_agent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6";
$form_data= 'login=Login&amp;usernamefld=admin&amp;passwordfld=#00000@0#';

$ckfile = "/tmp/Cookiefile.txt";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $loginUrl);
curl_setopt($ch, CURLOPT_COOKIEJAR, $ckfile);
//curl_setopt($ch, CURLOPT_COOKIEFILE, $ckfile);
// curl_setopt($ch, CURLOPT_COOKIE, "A=01;B=02;C=03");
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'login=Login&amp;usernamefld=admin&amp;passwordfld=#00000@0#');
//curl_setopt($ch, CURLOPT_POSTFIELDS, $form_data);
//curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
//curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
//curl_setopt($ch, CURLOPT_REFERER, $postUrl); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_exec($ch);

curl_setopt($ch, CURLOPT_URL, $postUrl);
curl_setopt($ch, CURLOPT_COOKIEFILE, $ckfile);
$store = curl_exec($ch);
//curl_exec($ch);
echo $store;

curl_close($ch);
?&gt;

</code></pre>
<pre><code>
CSRF check failed. Either your session has expired, this page has been inactive too long, or you need to enable cookies.
Debug: 

</code></pre>
]]></description><link>https://forum.netgate.com/post/425248</link><guid isPermaLink="true">https://forum.netgate.com/post/425248</guid><dc:creator><![CDATA[X.Z.]]></dc:creator><pubDate>Thu, 17 Oct 2013 08:36:10 GMT</pubDate></item><item><title><![CDATA[Reply to More PFSESNE collect the DCHP table on Thu, 17 Oct 2013 05:19:51 GMT]]></title><description><![CDATA[<p dir="auto">I tried using the LYNC login CENTOS<br />
A need to agree to two COOKIE start<br />
May ask the problem is here to assist you modify the code<br />
Thank you!!</p>
<pre><code>
172.30.34.254 cookie：PHPSESSID=c5fd9a26bfd47842da6274f0087e0169 是否接受？ (Y/N/Always/neVer)
172.30.34.254 cookie：cookie_test=1381989432 是否接受？ (Y/N/Always/neVer)
Username:
____________________

Password:
____________________

Enter username and password to login.

Login

transparent
webConfigurator
pfsense
* System
+ Advanced
+ Cert Manager
+ Firmware
+ General Setup
+ High Avail. Sync
+ Logout
+ Packages
+ Routing
+ Setup Wizard
+ User Manager
* Interfaces

</code></pre>
]]></description><link>https://forum.netgate.com/post/425235</link><guid isPermaLink="true">https://forum.netgate.com/post/425235</guid><dc:creator><![CDATA[X.Z.]]></dc:creator><pubDate>Thu, 17 Oct 2013 05:19:51 GMT</pubDate></item><item><title><![CDATA[Reply to More PFSESNE collect the DCHP table on Wed, 16 Oct 2013 01:52:24 GMT]]></title><description><![CDATA[<p dir="auto">I tried using the following code to try to login<br />
But they are unable to successfully<br />
May I ask which side is wrong yet?</p>
<pre><code>
// http://000.000.000.000
// usernamefld   admin
// passwordfld   #00000@0#

$form_vars = array();

$username = 'admin';
$password = ' #00000@0#';
$loginUrl = 'http://000.000.000.000/index.php';
$postUrl='http://000.000.000.000';
$user_agent="Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $loginUrl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'usernamefld'.$username.'passwordfld'.$password);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent);

$store = curl_exec($ch);
echo $store
?&gt;

</code></pre>
<p dir="auto"><img src="/public/_imported_attachments_/1/error.PNG" alt="error.PNG" class=" img-fluid img-markdown" /><br />
<img src="/public/_imported_attachments_/1/error.PNG_thumb" alt="error.PNG_thumb" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.netgate.com/post/425026</link><guid isPermaLink="true">https://forum.netgate.com/post/425026</guid><dc:creator><![CDATA[X.Z.]]></dc:creator><pubDate>Wed, 16 Oct 2013 01:52:24 GMT</pubDate></item></channel></rss>