Jump to content
xisto Community

jossylala

Members
  • Content Count

    16
  • Joined

  • Last visited

1 Follower

About jossylala

  • Rank
    Newbie [Level 1]
  1. @rvalkass, what do i replace it with? do tell me.Thanks@nooc9, i dont really understand
  2. 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
  3. 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
  4. 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
  5. 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!
  6. 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?
  7. pleaese i need a script that i can use to create an online hosting company in the sense that i would recieve orders online and some other things just like in https://web4africa.ng/ please help.
  8. How much does a brand new motorola blade phone(Motorola SLVR L7) with bluetooth and memory card slot cost. And incase anybody has a fairly used one for sale please mail me .by posting here .please do help me because i really mean it.
  9. ???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.
  10. Interactive Nigerian city maps for your mobile phone.http://forums.xisto.com/no_longer_exists/ directions, find streets, find places, find objects, find nearest object etc.See attached file for compatible phones.
  11. Wooooooooo!!!!!. Well this thread is just for Nokia and Sony Ericsson fans. Just in one word. e.g. if you are for Sony Ericsson, just reply with "Sony Ericsson" .If you are for Nokia, just reply with "Nokia".Who go win? i never know.Here we go.
  12. 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.
  13. hello every one!i ma a medical student and i athinking of building an AIDS talk forum.wud you advise me to go for is?i really need your opinion
×
×
  • 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.