使用curl自动短信服务的问题
@edit:
修复了所有内容并解码了视图状态,这就是我现在得到的,仍然不起作用,它带我到一个具有所有这些功能的html:
<script type="text/javascript">
//<![CDATA[
var Page_ValidationSummaries = new Array(document.getElementById("ctl00_Blank_ctl00_vsEnviar"));
var Page_Validators = new Array(document.getElementById("ctl00_Blank_ctl00_rfvNumDDD"), document.getElementById("ctl00_Blank_ctl00_ctvDDD"), document.getElementById("ctl00_Blank_ctl00_rfvNumTelefone"), document.getElementById("ctl00_Blank_ctl00_ctvTelefone"), document.getElementById("ctl00_Blank_ctl00_rfvMensagem"));
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
var ctl00_Blank_ctl00_rfvNumDDD = document.all ? document.all["ctl00_Blank_ctl00_rfvNumDDD"] : document.getElementById("ctl00_Blank_ctl00_rfvNumDDD");
ctl00_Blank_ctl00_rfvNumDDD.controltovalidate = "ctl00_Blank_ctl00_txtNumDDD";
ctl00_Blank_ctl00_rfvNumDDD.focusOnError = "t";
ctl00_Blank_ctl00_rfvNumDDD.errormessage = "DDD";
ctl00_Blank_ctl00_rfvNumDDD.display = "None";
ctl00_Blank_ctl00_rfvNumDDD.validationGroup = "Enviar";
ctl00_Blank_ctl00_rfvNumDDD.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
ctl00_Blank_ctl00_rfvNumDDD.initialvalue = "";
var ctl00_Blank_ctl00_ctvDDD = document.all ? document.all["ctl00_Blank_ctl00_ctvDDD"] : document.getElementById("ctl00_Blank_ctl00_ctvDDD");
ctl00_Blank_ctl00_ctvDDD.errormessage = "DDD com 2 dígitos";
ctl00_Blank_ctl00_ctvDDD.display = "None";
ctl00_Blank_ctl00_ctvDDD.validationGroup = "Enviar";
ctl00_Blank_ctl00_ctvDDD.evaluationfunction = "CustomValidatorEvaluateIsValid";
ctl00_Blank_ctl00_ctvDDD.clientvalidationfunction = "ValidarDDD";
ctl00_Blank_ctl00_ctvDDD.validateemptytext = "true";
var ctl00_Blank_ctl00_rfvNumTelefone = document.all ? document.all["ctl00_Blank_ctl00_rfvNumTelefone"] : document.getElementById("ctl00_Blank_ctl00_rfvNumTelefone");
ctl00_Blank_ctl00_rfvNumTelefone.controltovalidate = "ctl00_Blank_ctl00_txtNumTelefone";
ctl00_Blank_ctl00_rfvNumTelefone.focusOnError = "t";
ctl00_Blank_ctl00_rfvNumTelefone.errormessage = "Telefone";
ctl00_Blank_ctl00_rfvNumTelefone.display = "None";
ctl00_Blank_ctl00_rfvNumTelefone.validationGroup = "Enviar";
ctl00_Blank_ctl00_rfvNumTelefone.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
ctl00_Blank_ctl00_rfvNumTelefone.initialvalue = "";
var ctl00_Blank_ctl00_ctvTelefone = document.all ? document.all["ctl00_Blank_ctl00_ctvTelefone"] : document.getElementById("ctl00_Blank_ctl00_ctvTelefone");
ctl00_Blank_ctl00_ctvTelefone.errormessage = "Telefone com 8 dígitos";
ctl00_Blank_ctl00_ctvTelefone.display = "None";
ctl00_Blank_ctl00_ctvTelefone.validationGroup = "Enviar";
ctl00_Blank_ctl00_ctvTelefone.evaluationfunction = "CustomValidatorEvaluateIsValid";
ctl00_Blank_ctl00_ctvTelefone.clientvalidationfunction = "ValidarTelefone";
ctl00_Blank_ctl00_ctvTelefone.validateemptytext = "true";
var ctl00_Blank_ctl00_rfvMensagem = document.all ? document.all["ctl00_Blank_ctl00_rfvMensagem"] : document.getElementById("ctl00_Blank_ctl00_rfvMensagem");
ctl00_Blank_ctl00_rfvMensagem.controltovalidate = "ctl00_Blank_ctl00_txtMensagem";
ctl00_Blank_ctl00_rfvMensagem.focusOnError = "t";
ctl00_Blank_ctl00_rfvMensagem.errormessage = "Mensagem";
ctl00_Blank_ctl00_rfvMensagem.display = "None";
ctl00_Blank_ctl00_rfvMensagem.validationGroup = "Enviar";
ctl00_Blank_ctl00_rfvMensagem.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
ctl00_Blank_ctl00_rfvMensagem.initialvalue = "";
var ctl00_Blank_ctl00_vsEnviar = document.all ? document.all["ctl00_Blank_ctl00_vsEnviar"] : document.getElementById("ctl00_Blank_ctl00_vsEnviar");
ctl00_Blank_ctl00_vsEnviar.headertext = "Campos de preenchimento obrigatório:";
ctl00_Blank_ctl00_vsEnviar.showmessagebox = "True";
ctl00_Blank_ctl00_vsEnviar.showsummary = "False";
ctl00_Blank_ctl00_vsEnviar.validationGroup = "Enviar";
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
Sys.Application.add_load(FirejQuery);
var Page_ValidationActive = false;
if (typeof(ValidatorOnLoad) == "function") {
ValidatorOnLoad();
}
function ValidatorOnSubmit() {
if (Page_ValidationActive) {
return ValidatorCommonOnSubmit();
}
else {
return true;
}
}
document.getElementById('ctl00_Blank_ctl00_vsEnviar').dispose = function() {
Array.remove(Page_ValidationSummaries, document.getElementById('ctl00_Blank_ctl00_vsEnviar'));
}
Sys.Application.initialize();
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbCpfCnpj"}, null, null, $get("ctl00_Blank_ctl00_txtCPFCNPJ"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbCPFAlterarCadastro"}, null, null, $get("ctl00_Blank_ctl00_txtCPFAlterarCadastro"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbDDDAlterarCadastro"}, null, null, $get("ctl00_Blank_ctl00_txtDDDAlterarCadastro"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbTelefoneAlterarCadastro"}, null, null, $get("ctl00_Blank_ctl00_txtTelefoneAlterarCadastro"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbCPFAlterarCadastroNC"}, null, null, $get("ctl00_Blank_ctl00_txtCPFAlterarCadastroNC"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbDDDAlterarCadastroNC"}, null, null, $get("ctl00_Blank_ctl00_txtDDDAlterarCadastroNC"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbTelefoneAlterarCadastroNC"}, null, null, $get("ctl00_Blank_ctl00_txtTelefoneAlterarCadastroNC"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbCEP1AlterarCadastroNC"}, null, null, $get("ctl00_Blank_ctl00_txtCEP1AlterarCadastroNC"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbCEP2AlterarCadastroNC"}, null, null, $get("ctl00_Blank_ctl00_txtCEP2AlterarCadastroNC"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbCPFEsqueciSenha"}, null, null, $get("ctl00_Blank_ctl00_txtCPFEsqueciSenha"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbCPFAlterarSenha"}, null, null, $get("ctl00_Blank_ctl00_txtCPFAlterarSenhaNC"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbSenhaAtualAlterarSenhaNC"}, null, null, $get("ctl00_Blank_ctl00_txtSenhaAtualAlterarSenhaNC"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbNovaSenhaAlterarSenhaNC"}, null, null, $get("ctl00_Blank_ctl00_txtNovaSenhaAlterarSenhaNC"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbConfirmeNovaSenhaAlterarSenhaNC"}, null, null, $get("ctl00_Blank_ctl00_txtConfirmeNovaSenhaAlterarSenhaNC"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbNumDDD"}, null, null, $get("ctl00_Blank_ctl00_txtNumDDD"));
});
document.getElementById('ctl00_Blank_ctl00_rfvNumDDD').dispose = function() {
Array.remove(Page_Validators, document.getElementById('ctl00_Blank_ctl00_rfvNumDDD'));
}
document.getElementById('ctl00_Blank_ctl00_ctvDDD').dispose = function() {
Array.remove(Page_Validators, document.getElementById('ctl00_Blank_ctl00_ctvDDD'));
}
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbNumTelefone"}, null, null, $get("ctl00_Blank_ctl00_txtNumTelefone"));
});
document.getElementById('ctl00_Blank_ctl00_rfvNumTelefone').dispose = function() {
Array.remove(Page_Validators, document.getElementById('ctl00_Blank_ctl00_rfvNumTelefone'));
}
document.getElementById('ctl00_Blank_ctl00_ctvTelefone').dispose = function() {
Array.remove(Page_Validators, document.getElementById('ctl00_Blank_ctl00_ctvTelefone'));
}
document.getElementById('ctl00_Blank_ctl00_rfvMensagem').dispose = function() {
Array.remove(Page_Validators, document.getElementById('ctl00_Blank_ctl00_rfvMensagem'));
}
//]]>
</script>
</form>
<!-- START OF SmartSource Data Collector TAG -->
<script src="/nextelwebsite/js/webtrends.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
var _tag=new WebTrends();
_tag.dcsGetId();
//]]>>
</script>
<script type="text/javascript">
//<![CDATA[
// Add custom parameters here.
//_tag.DCSext.param_name=param_value;
_tag.dcsCollect();
//]]>>
</script>
<noscript>
<div>
<img alt="DCSIMG" id="DCSIMG" width="1" height="1" src="http://sdc.nextel.com.br/dcslz078000000wgujjv96o3y_8x7v/njs.gif?dcsuri=/nojavascript&WT.js=No&WT.tv=8.6.2" /></div>
</noscript>
<!-- END OF SmartSource Data Collector TAG -->
<script type="text/javascript" src="/nextelwebsite/js/Common.min.js"></script>
</body>
</html>
这是我当前的代码:
<?php
include('pegaForms.php');
echo pegaMaterias();
function pegaMaterias()
{
$header = array("Host: nextel.com.br", "Proxy-Connection: keep-alive", "Referer: http", "Content-Length: 3382", "Origin: http", "Cache-Control: no-cache", "X-MicrosoftAjax: Delta=true", "User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1 Paros/3.2.13", "Content-Type: application/x-www-form-urlencoded; charset=UTF-8", "Accept: */*", "Accept-Encoding: sdch", "Accept-Language: en-US,en;q=0.8", "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3", "Cookie: cAtm=a; ASP.NET_SessionId=wmqaqt55yswgyd45a31avb45; WT_FPC=id=139.82.60.168-3061391072.30168743:lv=1313586431216:ss=1313584965026");
$array_parametros = array();
$array_parametros['ctl00_ScriptManager1'] = "ctl00\_Blank\_ctl00\_upSMS|ctl00\_Blank\_ctl00\_lkbEnviarSMS";
$array_parametros['ctl00_Blank_ctl00_hidUpdate'] = "";
$array_parametros['ctl00_Blank_ctl00_txtTipoCliente'] = "S";
$array_parametros['ctl00_Blank_ctl00_txtAlert'] = "";
$array_parametros['ctl00_Blank_ctl00_txtjQuery'] = "";
$array_parametros['ctl00_Blank_ctl00_txtFleetID'] = "";
$array_parametros['ctl00_Blank_ctl00_txtSenhaIndividual'] = "";
$array_parametros['ctl00_Blank_ctl00_txtCPFCNPJ'] = "";
$array_parametros['ctl00_Blank_ctl00_txtSenha'] = "";
$array_parametros['ctl00_Blank_ctl00_caracteres'] = "";
$array_parametros['ctl00_Blank_ctl00_txtFleetIDAlterarCadastro'] = "";
$array_parametros['ctl00_Blank_ctl00_txtCPFAlterarCadastro'] = "";
$array_parametros['ctl00_Blank_ctl00_txtNomeAlterarCadastro'] = "";
$array_parametros['ctl00_Blank_ctl00_txtEmpresaAlterarCadastro'] = "";
$array_parametros['ctl00_Blank_ctl00_txtDDDAlterarCadastro'] = "";
$array_parametros['ctl00_Blank_ctl00_txtTelefoneAlterarCadastro'] = "";
$array_parametros['ctl00_Blank_ctl00_txtEmailAlterarCadastro'] = "";
$array_parametros['ctl00_Blank_ctl00_txtCPFAlterarCadastroNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtNomeAlterarCadastroNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtEmpresaAlterarCadastroNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtDDDAlterarCadastroNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtTelefoneAlterarCadastroNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtCEP1AlterarCadastroNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtCEP2AlterarCadastroNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtEmailAlterarCadastroNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtFleetIDEsqueciSenha'] = "";
$array_parametros['ctl00_Blank_ctl00_txtEmailEsqueciSenha'] = "";
$array_parametros['ctl00_Blank_ctl00_txtCPFEsqueciSenha'] = "";
$array_parametros['ctl00_Blank_ctl00_txtCPFAlterarSenhaNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtSenhaAtualAlterarSenhaNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtNovaSenhaAlterarSenhaNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtConfirmeNovaSenhaAlterarSenhaNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtNumDDD'] = "21";
$array_parametros['ctl00_Blank_ctl00_txtNumTelefone'] = "number";
$array_parametros['ctl00_Blank_ctl00_txtMensagem'] = "banana phone";
$array_parametros['ctl00_Blank_ctl00_txtContador'] = "108";
$array_parametros['__EVENTTARGET'] = "ctl00\_Blank\_ctl00\_lkbEnviarSMS";
$array_parametros['__EVENTARGUMENT'] = "";
$array_parametros['__VIEWSTATE'] = "5381
/NextelWebSite/NextelControls/wfGeraImagem.aspx?27b18018-88e1-4f2c-8f7a-e1d1a50497d4=zq9I&t=7032
MoveNext(0, 'ctl00_Blank_ctl00_txtNumDDD', 'ctl00_Blank_ctl00_txtNumTelefone', event);
MoveNext(0, 'ctl00_Blank_ctl00_txtNumDDD', 'ctl00_Blank_ctl00_txtNumTelefone', event);
MoveNext(0, 'ctl00_Blank_ctl00_txtNumTelefone', 'ctl00_Blank_ctl00_txtMensagem', event);
MoveNext(0, 'ctl00_Blank_ctl00_txtNumTelefone', 'ctl00_Blank_ctl00_txtMensagem', event);
120";
$array_parametros['__EVENTVALIDATION'] = "";
$array_parametros['__ASYNCPOST'] = "true";
//$array_parametros = format_postfields($array_parametros);
//echo $array_parametros;
$ch = curl_init();
$URL = "http://nextel.com.br/NextelWebSite/produtos/mensagens/sms/enviar_conteudo_copy1.aspx";
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_URL, $URL);
curl_setopt($ch, CURLOPT_POSTFIELDS, $array_parametros);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_VERBOSE, FALSE);
$ret = curl_exec($ch);
return $ret;
}
?>
@edit:
fixed everything and decoded the view state and this is what I got now, still isn't working, it takes me to a html with all these functions:
<script type="text/javascript">
//<![CDATA[
var Page_ValidationSummaries = new Array(document.getElementById("ctl00_Blank_ctl00_vsEnviar"));
var Page_Validators = new Array(document.getElementById("ctl00_Blank_ctl00_rfvNumDDD"), document.getElementById("ctl00_Blank_ctl00_ctvDDD"), document.getElementById("ctl00_Blank_ctl00_rfvNumTelefone"), document.getElementById("ctl00_Blank_ctl00_ctvTelefone"), document.getElementById("ctl00_Blank_ctl00_rfvMensagem"));
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
var ctl00_Blank_ctl00_rfvNumDDD = document.all ? document.all["ctl00_Blank_ctl00_rfvNumDDD"] : document.getElementById("ctl00_Blank_ctl00_rfvNumDDD");
ctl00_Blank_ctl00_rfvNumDDD.controltovalidate = "ctl00_Blank_ctl00_txtNumDDD";
ctl00_Blank_ctl00_rfvNumDDD.focusOnError = "t";
ctl00_Blank_ctl00_rfvNumDDD.errormessage = "DDD";
ctl00_Blank_ctl00_rfvNumDDD.display = "None";
ctl00_Blank_ctl00_rfvNumDDD.validationGroup = "Enviar";
ctl00_Blank_ctl00_rfvNumDDD.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
ctl00_Blank_ctl00_rfvNumDDD.initialvalue = "";
var ctl00_Blank_ctl00_ctvDDD = document.all ? document.all["ctl00_Blank_ctl00_ctvDDD"] : document.getElementById("ctl00_Blank_ctl00_ctvDDD");
ctl00_Blank_ctl00_ctvDDD.errormessage = "DDD com 2 dígitos";
ctl00_Blank_ctl00_ctvDDD.display = "None";
ctl00_Blank_ctl00_ctvDDD.validationGroup = "Enviar";
ctl00_Blank_ctl00_ctvDDD.evaluationfunction = "CustomValidatorEvaluateIsValid";
ctl00_Blank_ctl00_ctvDDD.clientvalidationfunction = "ValidarDDD";
ctl00_Blank_ctl00_ctvDDD.validateemptytext = "true";
var ctl00_Blank_ctl00_rfvNumTelefone = document.all ? document.all["ctl00_Blank_ctl00_rfvNumTelefone"] : document.getElementById("ctl00_Blank_ctl00_rfvNumTelefone");
ctl00_Blank_ctl00_rfvNumTelefone.controltovalidate = "ctl00_Blank_ctl00_txtNumTelefone";
ctl00_Blank_ctl00_rfvNumTelefone.focusOnError = "t";
ctl00_Blank_ctl00_rfvNumTelefone.errormessage = "Telefone";
ctl00_Blank_ctl00_rfvNumTelefone.display = "None";
ctl00_Blank_ctl00_rfvNumTelefone.validationGroup = "Enviar";
ctl00_Blank_ctl00_rfvNumTelefone.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
ctl00_Blank_ctl00_rfvNumTelefone.initialvalue = "";
var ctl00_Blank_ctl00_ctvTelefone = document.all ? document.all["ctl00_Blank_ctl00_ctvTelefone"] : document.getElementById("ctl00_Blank_ctl00_ctvTelefone");
ctl00_Blank_ctl00_ctvTelefone.errormessage = "Telefone com 8 dígitos";
ctl00_Blank_ctl00_ctvTelefone.display = "None";
ctl00_Blank_ctl00_ctvTelefone.validationGroup = "Enviar";
ctl00_Blank_ctl00_ctvTelefone.evaluationfunction = "CustomValidatorEvaluateIsValid";
ctl00_Blank_ctl00_ctvTelefone.clientvalidationfunction = "ValidarTelefone";
ctl00_Blank_ctl00_ctvTelefone.validateemptytext = "true";
var ctl00_Blank_ctl00_rfvMensagem = document.all ? document.all["ctl00_Blank_ctl00_rfvMensagem"] : document.getElementById("ctl00_Blank_ctl00_rfvMensagem");
ctl00_Blank_ctl00_rfvMensagem.controltovalidate = "ctl00_Blank_ctl00_txtMensagem";
ctl00_Blank_ctl00_rfvMensagem.focusOnError = "t";
ctl00_Blank_ctl00_rfvMensagem.errormessage = "Mensagem";
ctl00_Blank_ctl00_rfvMensagem.display = "None";
ctl00_Blank_ctl00_rfvMensagem.validationGroup = "Enviar";
ctl00_Blank_ctl00_rfvMensagem.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
ctl00_Blank_ctl00_rfvMensagem.initialvalue = "";
var ctl00_Blank_ctl00_vsEnviar = document.all ? document.all["ctl00_Blank_ctl00_vsEnviar"] : document.getElementById("ctl00_Blank_ctl00_vsEnviar");
ctl00_Blank_ctl00_vsEnviar.headertext = "Campos de preenchimento obrigatório:";
ctl00_Blank_ctl00_vsEnviar.showmessagebox = "True";
ctl00_Blank_ctl00_vsEnviar.showsummary = "False";
ctl00_Blank_ctl00_vsEnviar.validationGroup = "Enviar";
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
Sys.Application.add_load(FirejQuery);
var Page_ValidationActive = false;
if (typeof(ValidatorOnLoad) == "function") {
ValidatorOnLoad();
}
function ValidatorOnSubmit() {
if (Page_ValidationActive) {
return ValidatorCommonOnSubmit();
}
else {
return true;
}
}
document.getElementById('ctl00_Blank_ctl00_vsEnviar').dispose = function() {
Array.remove(Page_ValidationSummaries, document.getElementById('ctl00_Blank_ctl00_vsEnviar'));
}
Sys.Application.initialize();
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbCpfCnpj"}, null, null, $get("ctl00_Blank_ctl00_txtCPFCNPJ"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbCPFAlterarCadastro"}, null, null, $get("ctl00_Blank_ctl00_txtCPFAlterarCadastro"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbDDDAlterarCadastro"}, null, null, $get("ctl00_Blank_ctl00_txtDDDAlterarCadastro"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbTelefoneAlterarCadastro"}, null, null, $get("ctl00_Blank_ctl00_txtTelefoneAlterarCadastro"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbCPFAlterarCadastroNC"}, null, null, $get("ctl00_Blank_ctl00_txtCPFAlterarCadastroNC"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbDDDAlterarCadastroNC"}, null, null, $get("ctl00_Blank_ctl00_txtDDDAlterarCadastroNC"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbTelefoneAlterarCadastroNC"}, null, null, $get("ctl00_Blank_ctl00_txtTelefoneAlterarCadastroNC"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbCEP1AlterarCadastroNC"}, null, null, $get("ctl00_Blank_ctl00_txtCEP1AlterarCadastroNC"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbCEP2AlterarCadastroNC"}, null, null, $get("ctl00_Blank_ctl00_txtCEP2AlterarCadastroNC"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbCPFEsqueciSenha"}, null, null, $get("ctl00_Blank_ctl00_txtCPFEsqueciSenha"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbCPFAlterarSenha"}, null, null, $get("ctl00_Blank_ctl00_txtCPFAlterarSenhaNC"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbSenhaAtualAlterarSenhaNC"}, null, null, $get("ctl00_Blank_ctl00_txtSenhaAtualAlterarSenhaNC"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbNovaSenhaAlterarSenhaNC"}, null, null, $get("ctl00_Blank_ctl00_txtNovaSenhaAlterarSenhaNC"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbConfirmeNovaSenhaAlterarSenhaNC"}, null, null, $get("ctl00_Blank_ctl00_txtConfirmeNovaSenhaAlterarSenhaNC"));
});
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbNumDDD"}, null, null, $get("ctl00_Blank_ctl00_txtNumDDD"));
});
document.getElementById('ctl00_Blank_ctl00_rfvNumDDD').dispose = function() {
Array.remove(Page_Validators, document.getElementById('ctl00_Blank_ctl00_rfvNumDDD'));
}
document.getElementById('ctl00_Blank_ctl00_ctvDDD').dispose = function() {
Array.remove(Page_Validators, document.getElementById('ctl00_Blank_ctl00_ctvDDD'));
}
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.FilteredTextBoxBehavior, {"FilterType":2,"id":"ctl00_Blank_ctl00_ftbNumTelefone"}, null, null, $get("ctl00_Blank_ctl00_txtNumTelefone"));
});
document.getElementById('ctl00_Blank_ctl00_rfvNumTelefone').dispose = function() {
Array.remove(Page_Validators, document.getElementById('ctl00_Blank_ctl00_rfvNumTelefone'));
}
document.getElementById('ctl00_Blank_ctl00_ctvTelefone').dispose = function() {
Array.remove(Page_Validators, document.getElementById('ctl00_Blank_ctl00_ctvTelefone'));
}
document.getElementById('ctl00_Blank_ctl00_rfvMensagem').dispose = function() {
Array.remove(Page_Validators, document.getElementById('ctl00_Blank_ctl00_rfvMensagem'));
}
//]]>
</script>
</form>
<!-- START OF SmartSource Data Collector TAG -->
<script src="/nextelwebsite/js/webtrends.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
var _tag=new WebTrends();
_tag.dcsGetId();
//]]>>
</script>
<script type="text/javascript">
//<![CDATA[
// Add custom parameters here.
//_tag.DCSext.param_name=param_value;
_tag.dcsCollect();
//]]>>
</script>
<noscript>
<div>
<img alt="DCSIMG" id="DCSIMG" width="1" height="1" src="http://sdc.nextel.com.br/dcslz078000000wgujjv96o3y_8x7v/njs.gif?dcsuri=/nojavascript&WT.js=No&WT.tv=8.6.2" /></div>
</noscript>
<!-- END OF SmartSource Data Collector TAG -->
<script type="text/javascript" src="/nextelwebsite/js/Common.min.js"></script>
</body>
</html>
And this is my current code:
<?php
include('pegaForms.php');
echo pegaMaterias();
function pegaMaterias()
{
$header = array("Host: nextel.com.br", "Proxy-Connection: keep-alive", "Referer: http", "Content-Length: 3382", "Origin: http", "Cache-Control: no-cache", "X-MicrosoftAjax: Delta=true", "User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1 Paros/3.2.13", "Content-Type: application/x-www-form-urlencoded; charset=UTF-8", "Accept: */*", "Accept-Encoding: sdch", "Accept-Language: en-US,en;q=0.8", "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3", "Cookie: cAtm=a; ASP.NET_SessionId=wmqaqt55yswgyd45a31avb45; WT_FPC=id=139.82.60.168-3061391072.30168743:lv=1313586431216:ss=1313584965026");
$array_parametros = array();
$array_parametros['ctl00_ScriptManager1'] = "ctl00\_Blank\_ctl00\_upSMS|ctl00\_Blank\_ctl00\_lkbEnviarSMS";
$array_parametros['ctl00_Blank_ctl00_hidUpdate'] = "";
$array_parametros['ctl00_Blank_ctl00_txtTipoCliente'] = "S";
$array_parametros['ctl00_Blank_ctl00_txtAlert'] = "";
$array_parametros['ctl00_Blank_ctl00_txtjQuery'] = "";
$array_parametros['ctl00_Blank_ctl00_txtFleetID'] = "";
$array_parametros['ctl00_Blank_ctl00_txtSenhaIndividual'] = "";
$array_parametros['ctl00_Blank_ctl00_txtCPFCNPJ'] = "";
$array_parametros['ctl00_Blank_ctl00_txtSenha'] = "";
$array_parametros['ctl00_Blank_ctl00_caracteres'] = "";
$array_parametros['ctl00_Blank_ctl00_txtFleetIDAlterarCadastro'] = "";
$array_parametros['ctl00_Blank_ctl00_txtCPFAlterarCadastro'] = "";
$array_parametros['ctl00_Blank_ctl00_txtNomeAlterarCadastro'] = "";
$array_parametros['ctl00_Blank_ctl00_txtEmpresaAlterarCadastro'] = "";
$array_parametros['ctl00_Blank_ctl00_txtDDDAlterarCadastro'] = "";
$array_parametros['ctl00_Blank_ctl00_txtTelefoneAlterarCadastro'] = "";
$array_parametros['ctl00_Blank_ctl00_txtEmailAlterarCadastro'] = "";
$array_parametros['ctl00_Blank_ctl00_txtCPFAlterarCadastroNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtNomeAlterarCadastroNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtEmpresaAlterarCadastroNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtDDDAlterarCadastroNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtTelefoneAlterarCadastroNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtCEP1AlterarCadastroNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtCEP2AlterarCadastroNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtEmailAlterarCadastroNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtFleetIDEsqueciSenha'] = "";
$array_parametros['ctl00_Blank_ctl00_txtEmailEsqueciSenha'] = "";
$array_parametros['ctl00_Blank_ctl00_txtCPFEsqueciSenha'] = "";
$array_parametros['ctl00_Blank_ctl00_txtCPFAlterarSenhaNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtSenhaAtualAlterarSenhaNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtNovaSenhaAlterarSenhaNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtConfirmeNovaSenhaAlterarSenhaNC'] = "";
$array_parametros['ctl00_Blank_ctl00_txtNumDDD'] = "21";
$array_parametros['ctl00_Blank_ctl00_txtNumTelefone'] = "number";
$array_parametros['ctl00_Blank_ctl00_txtMensagem'] = "banana phone";
$array_parametros['ctl00_Blank_ctl00_txtContador'] = "108";
$array_parametros['__EVENTTARGET'] = "ctl00\_Blank\_ctl00\_lkbEnviarSMS";
$array_parametros['__EVENTARGUMENT'] = "";
$array_parametros['__VIEWSTATE'] = "5381
/NextelWebSite/NextelControls/wfGeraImagem.aspx?27b18018-88e1-4f2c-8f7a-e1d1a50497d4=zq9I&t=7032
MoveNext(0, 'ctl00_Blank_ctl00_txtNumDDD', 'ctl00_Blank_ctl00_txtNumTelefone', event);
MoveNext(0, 'ctl00_Blank_ctl00_txtNumDDD', 'ctl00_Blank_ctl00_txtNumTelefone', event);
MoveNext(0, 'ctl00_Blank_ctl00_txtNumTelefone', 'ctl00_Blank_ctl00_txtMensagem', event);
MoveNext(0, 'ctl00_Blank_ctl00_txtNumTelefone', 'ctl00_Blank_ctl00_txtMensagem', event);
120";
$array_parametros['__EVENTVALIDATION'] = "";
$array_parametros['__ASYNCPOST'] = "true";
//$array_parametros = format_postfields($array_parametros);
//echo $array_parametros;
$ch = curl_init();
$URL = "http://nextel.com.br/NextelWebSite/produtos/mensagens/sms/enviar_conteudo_copy1.aspx";
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_URL, $URL);
curl_setopt($ch, CURLOPT_POSTFIELDS, $array_parametros);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_VERBOSE, FALSE);
$ret = curl_exec($ch);
return $ret;
}
?>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我看到的一些问题
*) 值是 url 编码的,
这应该是
ctl00%24Blank%24ctl00%24txtTipoCliente => ctl00$Blank$ctl00$txtTipoCliente
您可以使用它来更正参数
http://meyerweb.com/eric/tools/dencoder/ 或通过 php 运行它们< a href="http://se.php.net/urldecode" rel="nofollow">urldecode
*) 等号后面的部分应该放入
this
值中$array_parametros['ctl00%24Blank%24ctl00%24txtTipoCliente=S'] = "";
应该是
$array_parametros['ctl00$Blank$ctl00$txtTipoCliente'] = "S";
*) ASP.NET 和 ViewState 加密
__VIEWSTATE 表明服务器正在使用 ASP.NET 并且 VIEWSTATE 可能已加密。这意味着如果不获取 sessionid/cookie,可能很难完成您正在尝试的事情。
我猜测,但我相信您收到的错误页面是由于视图状态验证失败造成的,但我可能是错的。尝试如上所述修复请求参数,看看它是否适合您。
A few of problems I see
*) Values are url encoded
this should be
ctl00%24Blank%24ctl00%24txtTipoCliente => ctl00$Blank$ctl00$txtTipoCliente
You can use this to correct the parameters
http://meyerweb.com/eric/tools/dencoder/ or run them through php urldecode
*) The part after the equal should go in the value
this
$array_parametros['ctl00%24Blank%24ctl00%24txtTipoCliente=S'] = "";
should be
$array_parametros['ctl00$Blank$ctl00$txtTipoCliente'] = "S";
*) ASP.NET and ViewState encryption
The __VIEWSTATE suggest the server is using ASP.NET and the VIEWSTATE is likely encrypted. This means it might be very difficult to accomplish what you are trying withough getting sessionid/cookies.
I am guessing but I believe the error page you are getting is due to view state validation failing but I could be wrong. Try to fix the request parameters as described above and see if it works for you.