Note that there are some explanatory texts on larger screens.

plurals
  1. POcurl simple form, why session false
    primarykey
    data
    text
    <p>i tried many tutorials but all failed, i know for an experienced user it might be obvious, thx anyway.</p> <p>there is the simple form: <a href="https://www.shab.ch/shabforms/COMMON/application/applicationGrid.jsp?template=1&amp;view=2&amp;page=/COMMON/search/searchForm.jsp?MODE=SHAB" rel="nofollow">https://www.shab.ch/shabforms/COMMON/application/applicationGrid.jsp?template=1&amp;view=2&amp;page=/COMMON/search/searchForm.jsp?MODE=SHAB</a></p> <p>here is my script which returns only the empty form instead of my POST search: (i used tamper-data to get the Post-variables, i also use https)</p> <pre><code>$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://www.shab.ch/shabforms/COMMON/application/applicationGrid.jsp?template=1&amp;view=2&amp;page=/COMMON/search/searchForm.jsp?MODE=SHAB'); curl_setopt($ch, CURLOPT_POSTFIELDS,'KEYWORDS=&amp;NOTICE_NR=&amp;TIMESPAN=TODAY&amp;STAT_TM_1=&amp;STAT_TM_2=&amp;SELTYPE=HR&amp;TYPE_CD_AW=&amp;TYPE_CD_AN=&amp;TYPE_CD_BL=&amp;TYPE_CD_VM=&amp;TYPE_CD_HR=HR01&amp;LEGAL_FORM_NR_HR=&amp;FIRM_ID_HR=&amp;HR_CANTON_AG=ON&amp;HR_CANTON_BE=ON&amp;TYPE_CD_IS=&amp;TYPE_CD_KK=&amp;YN_KK=&amp;TYPE_CD_IP=&amp;TYPE_CD_NA=&amp;YN_NA=&amp;TYPE_CD_SB=&amp;YN_SB=&amp;TYPE_CD_SR=&amp;FIRM_NAME_TX_UP=&amp;FIRM_CITY_TX_UP=&amp;command=Recherchieren'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_REFERER,"https://www.shab.ch/shabforms/COMMON/application/applicationGrid.jsp?template=1&amp;view=2&amp;page=/COMMON/search/searchForm.jsp%3Fcategory%3DHR"); curl_setopt($ch, CURLOPT_COOKIEJAR, "my_cookies.txt"); curl_setopt($ch, CURLOPT_COOKIEFILE, "my_cookies.txt"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3"); $result = curl_exec($ch); echo $result; </code></pre> <p>This has <strong>strangely</strong> been written into my_cookies.txt</p> <pre><code>www.shab.ch FALSE /shabforms FALSE 0 JSESSIONID E884A3B4187C68253CEEBCD58E7E934E www.shab.ch FALSE / FALSE 1287673522 BC_HA_C30B29681466613B 131BDF </code></pre> <p>What is wrong? :)</p> <p>UPDATE: Ok, i got the error. it was related to the post-url. the script on the website seems to do the process by ajax,... without changing the url to send (i could not even find the correct url in tamper data!!). Fortunately i could figure that out, its "shabforms/servlet/web/DocumentSearch".</p> <p>Now it works, thx</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload