Project Detail

A simple fix neede for php ASAP  

A simple fix neede for php ASAP is project number 339797
posted at Freelancer.com. Click here to post your own project.

 

| More Free Trial For New Buyers
 

Status:

Selected Providers: musaulker

Budget: $30-250

Created: 11/06/2008 at 15:57 EST

Bid Count: 5

Average Bid:
$ 34

11/08/2008 at 15:57 EST

Project Creator: smokenlinks
Employer Rating: 10/1010/1010/1010/1010/1010/1010/1010/1010/1010/10 (3 reviews)

Bid On This Project
 

Description

I am working on a script and i get this error

the fiel is attached need this ASAP so please if you do not have time to do this then DO NOT BID



Warning: fsockopen() [function.fsockopen]: unable to connect to https://www.alertpay.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in XXXXXXXXXXXXXX on line 84

I have contacted my host to make sure that ssl and all that is enabled he says it has been enabled and it still dont work

here is my server info
http://www.performancebux.com/info.php

If any one see what that problem is please let me know how to maybe fix it and maybe how to get it to work here is a copy of the php code that i am using to witch is causeing the problem


class CYsHttpClass
{
protected $cookies, $postdata,$r_header,$r_content,$s_request;
final protected function addCookie($k, $v)
{
if(is_array($k))
for($i=0;$i<sizeof($k);$i++)
$this->cookies[$k[$i]] = $v[$i];
else
$this->cookies[$k] = $v;
}
final protected function addPostData($k, $v)
{
if(is_array($k))
for($i=0;$i<sizeof($k);$i++)
$this->postdata[$k[$i]] = $v[$i];
else
$this->postdata[$k] = $v;
}
final protected function httpConnect($url,$method='GET',$referer='',$userag ent='PayChain')
{
$port = 80; //Set Default Port to 80
$method = strtoupper($method);

list($protocol,$server,$script) = preg_split("/(http|https)?://([^/]+)([^ ]*)/",$url,-1,PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);

if($protocol=="https")
$port = 443;

if(strpos($server,":") != false)
list($server,$port) = preg_split("/([^:]+):(.+)/",$server,-1,PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);

$cookiestring = "";
if(is_array($this->cookies))
if(sizeof($this->cookies) > 0)
foreach($this->cookies as $key=>$value)
{
if(strlen($cookiestring) != 0)
$cookiestring .= '; ';
$cookiestring .= urlencode($key) . '=' . urlencode($value);
}

$postdatastring = "";
if(is_array($this->postdata))
{
$postdatastring = "";
if(sizeof($this->postdata) > 0)
foreach($this->postdata as $key=>$value)
{
if(strlen($postdatastring) != 0) $postdatastring .= '&';
$postdatastring .= urlencode($key) . '=' . urlencode($value);
}
}

$this->postdata = array(); // reset postdata field after use

$this->s_request="$method $script HTTP/1.1rn";
$this->s_request.="Host: $serverrn";
$this->s_request.="Accept: */*rn";
if($cookiestring)
$this->s_request.="Cookie: $cookiestringrn";
if($referer)
$this->s_request.="Referer: $refererrn";
if($useragent)
$this->s_request.="User-Agent: $useragentrn";

$this->s_request.="Connection: closern";

if($method == "POST")
{
$this->s_request.="Content-Type: application/x-www-form-urlencodedrn";
$this->s_request.="Content-Length: ".strlen($postdatastring)."rn";
$this->s_request.="rn$postdatastringrn";
}
else
$this->s_request.="rn";

$sock = fsockopen(($protocol=="https"? "ssl://".$server : $server), $port, $errno, $errstr);
if($sock)
fwrite($sock, $this->s_request);
else
{
$this->r_header = "$errstr ($errno)";
return -1;
}

$this->r_header = "";
while($str = trim(fgets($sock, 4096)))
$this->r_header .= "$strn";

if(preg_match_all("/Set-Cookie: (.*); path/", $this->r_header, $newcookie))
foreach($newcookie[1] as $c)
{
list($k,$v) = explode("=", $c);
$this->cookies[$k] = $v;
}

$this->r_content = "";
while(1)
{
$buf = fread($sock,8192);
if(strlen($buf) == 0) break;
$this->r_content .= $buf;
}
// echo("DEBUG:".$this->r_content);
}
}

I have contacted my host and he says everything i need turned on for that to work is turned on and it still dont work

I wil pay via escrow but i do not want to spend a lot as i know its nothing major but i do not know what to do to fix it i do also have root to my server so if it is a server issue then i can fix that

I will not realease mone until the work is completed

I wish to have it fixed Asap if possable


Additional files submitted:
pc.inc.php

Messages Posted:1 View project clarification board Post message on project clarification board

Bid On This Project
 

If you are the project creator or one of the bidders Log In for more options

 

30

0 days

11-06-2008 16:16 EST

Hello, Please check PMB for solution, Thanks!

help

 

30

1 day

11-06-2008 16:28 EST

Please check PM. Thank you.

help

 

30

0 days

11-06-2008 16:30 EST

Will be fixed fast and right away.

help

ay4

 

40

0 days

11-06-2008 16:24 EST

Ready to work. If you interesting write me pm. Thank you. ay4

help

 

40

0 days

11-06-2008 17:27 EST

Hello, I'm ready to fix it.. Your regards,

help


    Bid on this Project