|
|
Posted by Andrea on 03/01/07 13:24
Hi there!
I have to do a php script that daily surf a webpage (I do it with
crontab) and collect some data.
The proble is that to access that webpage I have to do a login. I have
the login data, but do it via browser....ok, I'm not stupid, but do
that via php script...well I'm not able to do it.
The script is running on the server side, so it's useless to do the
login on my browser prior to run the script.
The page where I have to login has this code in it:
<form name="homesiteccontrol" method = "post" action="/sasa/index.jsp?
epi-content=LOGIN&epi-
process=home_process_login.jsp&type=url&form_url_name=http://
www.xxxxxxxx.xxx/sasa/site/ffds/?epi_menuItemID=5558e3fd3775e0c3beda0052c01041ca&target=top&source=sitecontrol"
target="_parent" style="margin-bottom:0px;">
<input type="hidden" name="realm" value="SQL">
<table width="148" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="login">
<table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td colspan="2"><img src="/images/xxxxxxx/newhome/
login.gif" width="45" height="20" /></td>
</tr>
<tr>
<td colspan="2" class="login_box">Username
<input name="logon" type="text" class="login_form"
size="15" maxlength="50">
</td>
</tr>
<tr>
<td valign="bottom" class="login_box">Password
<input name="password" class="login_form"
type="password" size="15" maxlength="20" onKeyPress="return
submitenter(this,event)"/>
</td>
<td valign="bottom">
<input name="Invia" type="image" src="/images/
xxxxxxxxx/newhome/login_box_frecce.gif" width="26" height="17">
</td>
</tr>
<tr>
<td colspan="2">
<a href="http://www.xxxxxxxx.xxx/sasa/site/ffds/?
epi_menuItemID=a2dc1cab4db4465fb70c3072e02041ca&beanID=98976176&viewID=richiestaPass&epi-
content=GENERIC" class="link_login_box">password dimenticata?</a>
<a href="http://www.xxxxxxxx.xxx/sasa/site/ffds/?
epi_menuItemID=61c946e879c833d632294560c01041ca"><img src="/images/
xxxxxxxxx/newhome/login_box_registrazione_it.gif" width="129"
height="19" border="0" /></a>
</td>
</tr>
</table>
</td>
<td width="7"><img src="/images/xxxxxxxxx/newhome/
login_box_dx.gif" width="7" height="128" /></td>
</tr>
</table>
</form>
How can I do it???
Thanks,
Andrea
[Back to original message]
|