Jump to content

cURL problem


Username:

Recommended Posts

I'm trying to submit to my site using this script that I made:

<?php
session_start();
	$title = "<title>CS</title>";
	$url =  "http://cheatskape.com/wtag/sendchat.php";
	$token = md5(uniqid(rand(), true));
	$_SESSION['token'] = $token;	
	$ch = curl_init();				//Initalize a new cURL session
	$name = "PROBLEM";
	$msg = "LOL";
	$postfields = "token=".$token."&name=".$name."&url=&message=".$msg."";
echo $title; //set the title of the window
curl_setopt($ch, CURLOPT_POST, 1); //set the type,
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); //and what fields to use
curl_setopt($ch, CURLOPT_URL, $url);//Set the URL to use
curl_exec($ch); //execute it
echo "<br /><br /><br />"; 
print_r(curl_getinfo($ch)); //Print info of the cURL execution
curl_close($ch);					//Close our current cURL session
?>

However, it refuses to post..

 

What am I doing wrong? This is my first time using cURL

 

the curl info shows me this:

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.