Jump to content

Need help about cURL


nemesisphp

Recommended Posts

can someone help me create a cURL for this?

 

i think its a get method, right?

 

Access it including the GET parameters and make sure that settings are also follows. Dispatcher URL: http://website.net/gw/dispatcher.woof

 

GET Parameters:

RRN is the random reference number

SRC is the access code (i.e 2336)

DST is the recipient of the message (i.e. 639209547958)

MSG is the actual reply message up to 420 characters, including non printable characters.

KYWRD is the primary keyword (i.e. hello)

 

 

 

need help. thanks..

 

 

this is my current code

<?php

//getting the value of RRN
$rrn=urlencode($_GET['rrn']);
//getting the value of MSG
$msg=urlencode($_GET['msg']);
//getting the value of DST
$dst=urlencode($_GET['dst']);
//getting the value of SRC
$src=urlencode($_GET['src']);
//setting up the value of KYWRD
$kywrd = urlencode('KEYWORD');

//assuming that the dst here is 2336

$aw = "haha";


$str= "?src=".$dst."&dst=".$src."&msg=".$aw."&rrn=".$rrn."&kywrd=".$kywrd;

print $str;

$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,' http://www.website.net/gw/dispatcher.woof'.$str);
curl_exec($ch);
curl_close($ch);


?>

 

Is this correct? Thanks

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.