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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.