Jump to content
xisto Community

jossylala

Members
  • Content Count

    16
  • Joined

  • Last visited

Posts posted by jossylala


  1. i got a api from an sms provider that looks like this

    http://forums.xisto.com/no_longer_exists/

    am writing a php file for my sms site to send message so that the output would give something like the one above. Here is a look at my code:

    <?phpsession_start();include($HTTP_SERVER_VARS["DOCUMENT_ROOT"] ."/includes/config.inc.php");  if(isset($_SESSION['user_id'])){$user_id = $_SESSION['user_id'];} else {redirect("login.php"); exit();}$to = $_POST['to'];$msg = $_POST['msg'];$num_rows = CountRecords("SELECT * FROM ".TBL_CREDITS." WHERE user_id = $user_id");if($num_rows >0){$result = selectFrom("SELECT * FROM ".TBL_CREDITS." WHERE user_id = $user_id");if($result['credit'] < 1) {	  redirect("home.php?p=single&error=true"); }	else {						$username = 'private';	$password = 'private';	$to = $to;	$content = $msg;	$from = $from;	$url = 'http://forums.xisto.com/no_longer_exists/;;	/*	* We recommend that you use port 5567 instead of port 80, but your	* firewall will probably block access to this port (see FAQ for more	* details):	* $port = 5567;	*/	$ch = curl_init();	curl_setopt($ch, CURLOPT_URL, $url);	curl_setopt ($ch, CURLOPT_PORT, $port);	curl_setopt ($ch, CURLOPT_POST, 1);	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);	$post_body = '';	$post_fields = array(		username => $username,		password => $password,		message => $content,		to => $to		from => $from	);  	foreach($post_fields as $key=>$value) {		$post_body .= urlencode($key).'='.urlencode($value).'&';	}	$post_body = rtrim($post_body,'&');	curl_setopt ($ch, CURLOPT_POSTFIELDS, $post_body);	$response_string = curl_exec($ch);	$curl_info = curl_getinfo($ch);	if ($response_string == FALSE) {	   redirect("home.php?p=single&sent=fail");   	} elseif ($curl_info['http_code'] != 200) {		redirect("home.php?p=single&sent=fail");   	}	else {	  //  redirect("home.php?p=single&sent=fail&a=Z");   		$result = explode('|', $response_string);		//print_r($result);		if (count($result) != 3) {			redirect("home.php?p=single&sent=fail&a=A");   		} else {			if ($result[0] == '0') {				$amt1 = (int) $result['credit'];				$amt3 = $amt1 - 1;				update("UPDATE ".TBL_CREDITS." SET credit = ".$amt3); 				 redirect("home.php?p=single&sent=true"); 			}			else {							  if($result[0] == '24')			   redirect("home.php?p=single&sent=24&phone=".$to);	  			   else				   redirect("home.php?p=single&sent=fail&a=B");   				 			}		}	} 		 /*  		foreach($post_fields as $key=>$value) {		$post_body .= urlencode($key).'='.urlencode($value).'&';	}	$post_body = rtrim($post_body,'&');	curl_setopt ($ch, CURLOPT_POSTFIELDS, $post_body);	$response_string = curl_exec($ch);	$curl_info = curl_getinfo($ch);	if ($response_string == FALSE) {		print "cURL error: ".curl_error($ch)."\n";	} elseif ($curl_info['http_code'] != 200) {		print "Error: non-200 HTTP status code: ".$curl_info['http_code']."\n";	}	else {		print "Response from server:$response_string\n";		$result = split('\|', $response_string);		if (count($result) != 3) {			print "Error: could not parse valid return data from server.\n".count($result);		} else {			if ($result[0] == '0') {				print "Message sent - batch ID $result[2]\n";			}			else {print $result[0].'************';				print "<br>Error sending: status code [$result[0]] description [$result[1]]\n";			}		}	}			 */	curl_close($ch);													}}else{	redirect("home.php?p=single&error=true");}?>


    if i try sending sms through it i get something like, message not sent. what did i do wrong? please help

  2. Hello all, if you want to study abroad, i think China is the right place for you. You see,china universities have high tech facilities that other countries universities cant compete with this.Secondly, the study language if vast. they could teach you in spanish,french etc any native language including african languages. And thirdly, you dont have to pay any dime for admission and visa. all you need is to contact us, with you high school cert, a police report(showing that you are a good boy/girl) and then we would send you your admission letter and visa. after wish you then travel to you new school to make payment of your tution fees and accomodation fee. note, you dont make any payment to us, so your money is save. we just new foreign students. Note that schooling here if way cheaper that any any country you know and you get the best of education (am sure you know our technology capacity). all you have to do is show interest and send me a mail to admissionfinders at yahoo dot com . thanks


  3. Hi Jossy!
    Are you trying to build an interactive learning experience that you could give out on CD? I'd strongly recommend using Adobe Flash or Adobe Director, as they're purpose-built for it. You have to start off by collecting the multimedia assets - the music, images, sound, pictures and videos.

    I'm sure the kind people of Xisto will help you out with it if you can come up with the initial idea. Do post back to the thread, within what exactly you are trying to build.

    Regards,
    Nitin Reddy



    yeah, its an intereactive learning experince that could be given out on CD to secondary school students. Am of zero experince in multimedia though i have experience of web programming. so how do i go about it?
    and as of the music,videos,pictures and images, i was not given any because its a school seminar project for me. thanks

  4. Hey mates, i really need help in creating a multimedia tutor. I was given an assignment to create either a multimedia tutor for junior secondary school or a game base tutorial system for secondary. If i cant get anyone to help me do it,i would love someone to give me steps on creating a multimedia tutor. Thanks!


  5. I has a software. :D
    Sorry... that was the first thing that came to my mind when I read your subject title. (If no one gets it just yet, think of Caturday and LOLcats.) :P

    Anyway, Sonesay is right. You will need to hire someone with expertise in web development... or YOU could be the person to do it. Xisto is a great place to start with learning some of the important and basic stuff (in the tutorials section), but I'm sure Google will come up with tons of results as far as learning what you need to know to build a website with those capabilities. Look into learning PHP and CGI.

    thanks man but i would love to learn css bcos i know how to use xhtml.please is there any help you could offer me?

  6. ???Hello Everyone on Nairaland, I'm a new member here and i join Nairaland.com b'because i heard that it is where You get the real koko on phone problem, so i would like anyone to help me out, the problem i have is about the Nseries and Chinese Nokia Phones, I don't know if anyone have information about them, what i mean is where to download its applications and how to install them into it, b'because i'm unable to do it and it is the job i do 4 living i will really appreciate it if anyone here can help me out. Long live Nairaland, long live The federal republic of Nigeria.Forgot to tell u, I'm from Delta State, but right now I'm in Bonny Island Rivers State.


  7. I have been doing businesses with different individuals and believe me with all due respects to ladies and no gender discrimination. Ladies or should i say women are very difficult to satisfy when it comes to doing business.I have about 3 outstanding obs on ground that have already been completed bot this women are finding it difficult to sign my cheque and let me move on. instead they keep giving one silly excuse or the other. And i have done the same project for more than 4 guys far after i met this women and i have even forgotten I even got such projects.Aside them not wanting to pay well, the either delay payment or give faulty cheques to delay you or keep you waiting for hours in the waiting room.PLEASE ARE ALL BUSINESS WOMEN LIKE THIS?I need you to submit your experiences with both sexes and which is better dealing with.

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.