0

REspondam aqui quero resposta sobre o php

criado por Fernando Ferenz em 27/11/2010 2:45pm
Este curl estou utilizando no host gator que é php 5.2.14 mas não esta funcionando adequadamente podem me informar o erro meu php info é este www.orkuttools.com.br/info.php me ajudem preciso muito por favor.

eut estei na helio host e funciona so na host gator q ta fail php info do host bom http://www.heliohost.org/phpinfo.php

curl abaixo :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Curl</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body text="blue" link="blue" vlink="blue" alink="blue" onload="document.getElementById('carregando').style.display='none'">
<center>
<div id="carregando">
<img src="load.gif" alt="Aguarde"/><br/>
<font color="green" face="Comic Sans MS">
Floodando Aguarde <blink>...</blink>
</font>
</div>
</center>
<?php
ini_set('max_execution_time','999999');
function cURL($url, $header, $cookie, $post, $flw = 1)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, $header);
if ($url) {
curl_setopt($ch, CURLOPT_URL, $url);
} else {
die('#URL FAIL');
}
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
if ($cookie == true) {
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
}
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, $flw);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
if ($post) {
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
}
$exec = curl_exec($ch);
curl_close($ch);
if ($exec){
return $exec;
} else {
echo '#curl_exec() FAIL';
}
}
function login($login, $senha)
{
$loga = array("service" => "orkut", "Email" => $login, "Passwd" => $senha, "skipvpage" => "true");
$auth = cURL("https://www.google.com/accounts/ClientLogin?" . http_build_query($loga), 0, null, null);
$auth = explode("\nAuth=", $auth);
$auth = $auth[1];
$RedirLogin = cURL("http://www.orkut.com/RedirLogin.aspx?auth=" . $auth, 1, null, null);
preg_match('/orkut(.*?)=(.*?);/i', $RedirLogin, $cookie);
preg_match_all('/Set-Cookie: (.*?);/i', $RedirLogin, $S);
if ($cookie[0] == '') {
$v = '';
return $v;
} else {
$OSN = cURL("http://www.orkut.com.br/Scrapbook.aspx", 1, $cookie[0], null);
preg_match_all('/Set-Cookie: (.*?);/i', $OSN, $OSN);
$cookie = $cookie[0] . ';' . $S[1][1] . ';' . $OSN[1][1] . ';';
return $cookie;
}
}
function pt_sig($cookie)
{
$ptsig = cURL("http://www.orkut.com.br/Scrapbook.aspx", null, $cookie, null);
preg_match('/name="signature" value="(.*?)"/', $ptsig, $sig);
$sig = $sig[1];
preg_match('/name="POST_TOKEN" value="(.*?)"/', $ptsig, $post);
$pt = $post[1];
return $pt_sig = array("POST_TOKEN" => $pt, "signature" => $sig);
}
?>

Lista de Respostas:

0
27/11/2010 6:20pm
(~13 anos atrás)
Thiago Vaini respondeu:
talvez seja porque a versão do host gator é antiga...
fala pra eles atualizarem ou troca de servidor :D

0
27/11/2010 7:30pm
(~13 anos atrás)
Fernando Ferenz respondeu:
não não é antiga por q funfa ate na verlção 5.2.1 e na 5.3.3 mas na 5.2.14 não esta funcioando e eu ja falei pra eles atualiza e eles falaram q não podem

Nova Resposta:

(Você pode usar tags como <b>, <i> ou <code>. URLs serão convertidas para links automaticamente.)