1. Welcome to PHCorner Forums. Take a moment to Sign up and gain unlimited access and extra privileges that guests are not entitled to, such as:

    All that and more! Registration is quick, simple and absolutely free. Join our community today!

receiving data from website www.exmple.com to my local web server or xammp.

Discussion in 'Coding, Programming' started by sangoku199, Jun 1, 2015.

  1. patulong naman po ako sainyo.

    panu ko po ba magagrab yugn data nung website ko. heres my code

    <title>send sms</title>
    <form name="mainform" method="post" action="send.php">
    <table align="center">
    <td>Phone Number</td>
    <td><input type="text" name="number" id="PhoneNumber" size="20" placeholder="09xxxxxxxxx" maxlength="11" required /></td>
    <td colspan "3"><textarea id="message" rows=10 cols=36 name="message" placeholder="message at least 10 characters" required></textarea><br></td>
    <td align="center"><input value="SEND" type="submit"/></td>

    then ang send.php ko naman is

    $servername = "localhost";
    $username = "root";
    $password = "";
    $dbname = "sms";

    $PhoneNumber =$_POST['number'];
    $Message = $_POST['message'];

    try {
    $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
    // set the PDO error mode to exception
    $sql = "INSERT INTO outbox (DestinationNumber, TextDecoded, CreatorID) VALUES ('$PhoneNumber', '$Message')";
    // use exec() because no results are returned
    echo "Message Sent";
    catch(PDOException $e)
    echo $sql . "<br>" . $e->getMessage();

    $conn = null;

    pano ko po sya makukuha yung cobntent nung phone number kung nakalagay sya sa website na domain ko papunta sa home pc ko or yung local web server ko? please help naman dyan. salamat
  2. panu ko po ba masesend yung data nung phonenumber and message nung sa domain kong Please or Register to view links sa database ko sa bahay? please..

    up ko lng po
  3. kelangan mo gumawa ng web service , pero you need to know kung papaano mo i activate yung web service which will contain yung data mo from example.com,

    something like merong i click -- then yung web service tatawagin yung isa pang web service para isave naman yung data mo,
  4. salamat sir sa pagsagot pero di ko ganu nagets hehhe. begginer lang kasi sa ganito.
  5. try mo rin i google , pero me mga simpleng web service lang naman , and based sa code mo, pede mong i execute yung papunta sa kabilang website mo, upon click mo ng "send",

    Isa pang way yung Curl -- Please or Register to view links

    try mo basahin, interesting siya, kahit mag spend ka ilang hours , pag natutunan mo naman malaking tulong yan sa foundation ng data handling mo,
Tags / Keywords: