Since the curl Alex showed me worked perfectly with my fake Gaia editing program. I decided to play around with curl and try to make something that actually isn't a scam for a change. I want to make a webpage that will post PMs on Gaia. Now before I go setting up the array of names and a timer to post a new PM every 30 seconds (that is the max amount of time allowed between PMs on Gaia, last time I checked), I want to see if it's even possible first. This is the script I set up in a file called pmer.php:
PHP Code:
//pm from here
$postfields2 = "username=".$_POST['username']."&subject=".$_POST['subject']."&message=".$_POST['message']."&attach_sig=".$_POST['attach_sig'].'&post=&mode=post&src=&folder=inbox&id=';
$reffer2 = $data_url;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$pm_post_url);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields2);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_REFERER, $reffer2);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiefile);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiefile);
$result = curl_exec ($ch);
curl_close ($ch);
As you can tell by the title of my thread it's not working. Am I even going about this the right way? I don't need you to write the code for me, just point out my flaws with this and/or suggest a better way about going about it.