Go Back   Gaming Gutter > Non-Gaming > Programming


Programming - All general programming discussion in here.

» Site Navigation
» Home
» FAQ
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Advertisement
» Recent Threads
Go to first new post Redemption?
Today 05:57 PM
by Fly_Boy
Last post by Fly_Boy
Today 06:01 PM
2 Replies, 3 Views
Go to first new post I'm back.
Today 05:37 PM
Last post by Tyler
Today 06:01 PM
12 Replies, 13 Views
Go to first new post SSOTM...
Yesterday 02:42 PM
Last post by Fewmitz
Today 05:55 PM
31 Replies, 32 Views
Go to first new post Selling NP, SoS, FPot,...
Today 04:21 PM
by Vaspim
Last post by Arash
Today 05:55 PM
15 Replies, 16 Views
Go to first new post New New New
Today 04:41 PM
by Fly_Boy
Last post by Fly_Boy
Today 05:55 PM
5 Replies, 6 Views
Reply
 
LinkBack Thread Tools Display Modes

 [need help] PM posting Curl
Old 02-17-2008, 05:59 PM   #1 (permalink)
bug14 bug14 is offline Gender Male
Banned
 
bug14 is offline
Join Date: Oct 2007
Location: bugmenot.com
Posts: 1,532
iTrader: 2 / 100%
bug14 Is a Lord of Awesomenessbug14 Is a Lord of Awesomenessbug14 Is a Lord of Awesomeness
Rep Power: 0
[need help] PM posting Curl

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($chCURLOPT_URL,$pm_post_url);
curl_setopt($chCURLOPT_USERAGENT$agent);
curl_setopt($chCURLOPT_POST1); 
curl_setopt($chCURLOPT_POSTFIELDS$postfields2);  
curl_setopt($chCURLOPT_RETURNTRANSFER1); 
curl_setopt($chCURLOPT_FOLLOWLOCATION1);
curl_setopt($chCURLOPT_REFERER$reffer2);
curl_setopt($chCURLOPT_COOKIEFILE$cookiefile);
curl_setopt($chCURLOPT_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.

Last edited by bug14; 02-21-2008 at 11:56 AM.
  Reply With Quote

 
Old 02-17-2008, 07:29 PM   #2 (permalink)
Googlrr Googlrr is online now Gender Male
 
Googlrr's Avatar
 
Googlrr is online now
Join Date: Oct 2006
Location: New Hampshire?
Posts: 6,541
iTrader: 0 / 0%
Googlrr Is a Party CaptainGooglrr Is a Party CaptainGooglrr Is a Party Captain
Rep Power: 16
I'm not sure, but does it have something to do with the postdata not being encoded? o.o Like, if your input message included spaces and such, that wouldn't fly with the post data.

I'm not too good with cURL. Dx
__________________

Li-Shun is a god. ^


hatzganatta is awesome too ^^
  Reply With Quote

 
Old 02-18-2008, 03:37 PM   #3 (permalink)
bug14 bug14 is offline Gender Male
Banned
 
bug14 is offline
Join Date: Oct 2007
Location: bugmenot.com
Posts: 1,532
iTrader: 2 / 100%
bug14 Is a Lord of Awesomenessbug14 Is a Lord of Awesomenessbug14 Is a Lord of Awesomeness
Rep Power: 0
If I echo $result it shows Gaia, logged in, and and all the forms in the "Send a New PM" page are filled in with the variables(pm to, message, subject, etc) posted from my form, ready to be sent. I just don't know about posting it actually to gaia then because I don't know how to view the source of Gaia's privmsg.php. Do I need to str_replace "privmsg.php" with "http://www.gaiaonline.com/privmsg.php" or something?

EDIT: Am I missing a post field?
  Reply With Quote

 
Old 02-18-2008, 05:09 PM   #4 (permalink)
Googlrr Googlrr is online now Gender Male
 
Googlrr's Avatar
 
Googlrr is online now
Join Date: Oct 2006
Location: New Hampshire?
Posts: 6,541
iTrader: 0 / 0%
Googlrr Is a Party CaptainGooglrr Is a Party CaptainGooglrr Is a Party Captain
Rep Power: 16
username=username&subject=lolcakes&addbbcode22=bla ck&addbbcode24=12&addbbcode26=left&helpbox=&messag e=lolcakes&preview=&post=true&mode=post&src=&folde r=inbox&id=&x=42&y=10


There's my postdata. I would say try to leave all of it in, just to ensure no error.
__________________

Li-Shun is a god. ^


hatzganatta is awesome too ^^
  Reply With Quote

 
Old 02-18-2008, 05:11 PM   #5 (permalink)
masterjoe42 masterjoe42 is offline Gender Male
♥ Homosexual Member ♥
 
masterjoe42 is offline
Join Date: Jan 2008
Location: Laughing Man
Posts: 3,019
iTrader: 1 / 100%
masterjoe42 Is Gaminggutter's Town Bitch
Rep Power: 0
good luck, bug.
  Reply With Quote

 
Old 02-18-2008, 07:31 PM   #6 (permalink)
bug14 bug14 is offline Gender Male
Banned
 
bug14 is offline
Join Date: Oct 2007
Location: bugmenot.com
Posts: 1,532
iTrader: 2 / 100%
bug14 Is a Lord of Awesomenessbug14 Is a Lord of Awesomenessbug14 Is a Lord of Awesomeness
Rep Power: 0
Quote:
Originally Posted by Googlrr View Post
username=username&subject=lolcakes&addbbcode22=bla ck&addbbcode24=12&addbbcode26=left&helpbox=&messag e=lolcakes&preview=&post=true&mode=post&src=&folde r=inbox&id=&x=42&y=10


There's my postdata. I would say try to leave all of it in, just to ensure no error.
It works, OMG! I LOVE YOU! IT WORKED! OH YEAH BABY! btw. How did you get that post data? My method was saving the pm page and then have it post it into a text file to see what it was. Mine was missing the bbcode things and had an extra attatch_sig thing in there. I bet that was screwing it up.

I FUCKING LOVE YOU! +Rep!

Last edited by bug14; 02-18-2008 at 07:34 PM.
  Reply With Quote

 
Old 02-18-2008, 07:34 PM   #7 (permalink)
masterjoe42 masterjoe42 is offline Gender Male
♥ Homosexual Member ♥
 
masterjoe42 is offline
Join Date: Jan 2008
Location: Laughing Man
Posts: 3,019
iTrader: 1 / 100%
masterjoe42 Is Gaminggutter's Town Bitch
Rep Power: 0
. . .so this sends messages out to people. . .Can you decide what the message says?
  Reply With Quote

 
Old 02-18-2008, 07:47 PM   #8 (permalink)
bug14 bug14 is offline Gender Male
Banned
 
bug14 is offline
Join Date: Oct 2007
Location: bugmenot.com
Posts: 1,532
iTrader: 2 / 100%
bug14 Is a Lord of Awesomenessbug14 Is a Lord of Awesomenessbug14 Is a Lord of Awesomeness
Rep Power: 0
Quote:
Originally Posted by masterjoe42 View Post
. . .so this sends messages out to people. . .Can you decide what the message says?
Yeah. I'm basically making this so I can PM all 72 members of the guild that I own without all the hard work of manully doing it. I want to see if they will rally behind me in the petitions forum and get me unbanned (at least a temp unban so I can hand ownership over to my crew). I will release it here (when I'm done), if I can get Alex's permission. I can't PM him because his account is messed up here and I don't have a LG account. He already let me use this code once in my Gaia Editing program, but I should probably be certain.
  Reply With Quote

 
Old 02-18-2008, 07:50 PM   #9 (permalink)
masterjoe42 masterjoe42 is offline Gender Male
♥ Homosexual Member ♥
 
masterjoe42 is offline
Join Date: Jan 2008
Location: Laughing Man
Posts: 3,019
iTrader: 1 / 100%
masterjoe42 Is Gaminggutter's Town Bitch
Rep Power: 0
If Gaiaunline wasn't blocked, this would be beyond useful for sending the scam around to multiple people, making your job of getting the info on the accounts that much easier and that much faster.
  Reply With Quote

 
Old 02-18-2008, 07:52 PM   #10 (permalink)
bug14 bug14 is offline Gender Male
Banned
 
bug14 is offline
Join Date: Oct 2007
Location: bugmenot.com
Posts: 1,532
iTrader: 2 / 100%
bug14 Is a Lord of Awesomenessbug14 Is a Lord of Awesomenessbug14 Is a Lord of Awesomeness
Rep Power: 0
Quote:
Originally Posted by masterjoe42 View Post
If Gaiaunline wasn't blocked, this would be beyond useful for sending the scam around to multiple people, making your job of getting the info on the accounts that much easier and that much faster.
Yeah, scams makes it all the more worth releasing. And there is still Kyo's domain.
  Reply With Quote
Reply

Bookmarks



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -7. The time now is 06:01 PM.


vBulletin skin developed by: eXtremepixels
The contents of this webpage are copyright © 2006-2008 GamingGutter.com. All Rights Reserved.

Page generated in 0.20495605 seconds (100.00% PHP - 0% MySQL) with 19 queries