Jump to content

mosey

Members
  • Posts

    21
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mosey's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. mosey

    Td height help?

    LOL! Hehe ~ good point. Although, everyone starts with tables usually so perhaps Devine will make the leap alot faster^^
  2. mosey

    Td height help?

    I guess ToonMariner has the best suggestion with controlling the table cell height using 'class' and css. However, I'd agree that it's not really feasible to define height as it'sa bit touch and go depending on the browser.
  3. Good point! I hadn't thought of that.
  4. What have you done so far that's not working?
  5. Permission: For instance - if I try and load the image directly (http://fresnosar.com/logotrans3.gif), there's a 403 permission denied error. If you haven't set this up yourself, it could be that your host has turned this off automatically using .htaccess. People often use this to prevent e.g. hot linking of images etc.
  6. This really has nothing to do with HTML programming if I've understood your question correctly. The keyword here is : proxy. 1. Find a proxy server based in China that allows you to visit the site. 2. Find a list of proxy addresses, and change your Internet Explorer or Firefox to display this new IP. Bearing in mind this doesnt' always work first time, and you may need to go through 5-10 or even more numbers. The content is restricted to those based in China (to prevent leechers from abroad ...common in Japan for instance. I believe some large media sites in America also do the same. For the UK, the BBC restricts video access to those in the UK only)
  7. mosey

    Td height help?

    I'm afraid I don't quite understand what you'reasking, but throwing the code into a page (and tidying it up) results in a screenshot like the attached. Would you mind using this to describe what the issue is? Thanks! [attachment deleted by admin]
  8. If you've used/are using Wordpress, there is a plugin that changes outgoing links to e.g. open in new windows. http://www.semiologic.com/software/publishing/external-links/ Perhaps that could be used as a reference for further work?
  9. Ah, soz, my bad there Thanks for the correction! I guess it's not possible to universally encode everything but as there aren't too many variables, this is fine!
  10. ReDucTor: Thanks for the suggestion I've just tried to read up abit on get_file_contents and have understood it is for PHP5 (which isn't a problem) But I was wondering how I would apply it here (as a PHP newbie)? Would it literally be replacing the $file part ith get_file_contents($url) And for the encode part, is it something like $username = urlencode($_POST['username'])' or can I use this function later? I guess it would be easiest if I could encode all the parameters in one go or something. Thanks!
  11. Thank you very much! This worked for me (but I had to add an extra value to the fopen part:) $file = fopen($url,'r'); to indicate 'read only' or something like that.
  12. I guess it would help to know which scripts you're using etc.?
  13. I think it's this part that may be the cause of your problems: width:262px;height:64px; which is part of your HTML style values Hope this helps
  14. This is a continuation (sort of) from my previous post, but I would really appreciate some help with this! I currently have a PHP file that already includes variables such as 'username' and 'password' (for authentication), but I would like to collect the form data submitted, concatenate everything into one string, and then open up this string (which is essentially a url) I undrstand (with thanks to schme16) that I have to use $_POST['name_of_form input'] to retrieve the data, but after that I would like to put all of these into one string that looks like http://www.wbsite.com/something.php?username=$username&password=$password&msg=$message and then use fopen to load this url. Thanks in advance for any help!
  15. I'm afraid this is a bit of a long winded introduction for what I think would be a simple question: For reference, I'm trying to modify the SMS API kindly provided at Sourceforge (http://sourceforge.net/projects/sms-api/) to something that will send WAP PUSH messages. I have tried my best to modify it as much as I can without changing the essentials, but for some reason, I keep receiving an fopen error built into the script that informs me the script has died. The original (almost) working SMS API is something like this (with all the unnecssary bits cut out): function send($to=null, $from=null, $text=null, $msg_type=null, $climsgid=null) { /* Check SMS credits balance */ if ($this->getbalance() < $this->balace_limit) { die ("You have reach the SMS credit limit!"); }; /* Check SMS $text length */ if ($this->unicode == true) { $this->_chk_mbstring(); if (mb_strlen ($text) > 210) { die ("Your unicode message is to long! (Current length".mb_strlen ($text).")"); } /* Does message need to be concatenate */ if (mb_strlen ($text) > 70) { $concat = "&concat=3"; } else { $concat = ""; } } else { if (strlen ($text) > 465) { die ("Your message is to long! (Current length=".strlen ($text).")"); } /* Does message need to be concatenate */ if (strlen ($text) > 160) { $concat = "&concat=3"; } else { $concat = ""; } } /* collect message type from form */ $msg_type = $_POST["msg_type"]; /*collect client message id */ $climsgid = $_POST["climsgid"]; /*collect priority value */ $escalate = $_POST["escalate"]; /* Check $to and $from is not empty */ if (empty ($to)) { die ("You have not specified a destination address (TO)!"); } if (empty ($from)) { die ("You have not specified a source address (FROM)!"); } if (empty ($msg_type)) { die ("You have not specified a message type (MESSAGE TYPE)!"); } /* Reformat $to number */ $cleanup_chr = array ("+", " ", "(", ")", "\r", "\n", "\r\n"); $to = str_replace($cleanup_chr, "", $to); /* Send SMS now */ $comm = sprintf ("%s/sendmsg?session_id=%s&to=%s&from=%s&text=%s&msg_type=%s&climsgid=%s&escalate=%s&callback=%s&unicode=%s%s", $this->base, $this->session, rawurlencode($to), rawurlencode($from), $this->encode_message($text), $msg_type, $climsgid, $escalate, $this->callback, $this->unicode, $concat ); return $this->_parse_send ($this->_execgw($comm)); } /** * Encode message text according to required standard * @param text mixed Input text of message. * @return mixed Return encoded text of message. * @access public */ function encode_message ($text) { if ($this->unicode != true) { //standard encoding return rawurlencode($text); } else { //unicode encoding $uni_text_len = mb_strlen ($text, "UTF-8"); $out_text = ""; //encode each character in text for ($i=0; $i<$uni_text_len; $i++) { $out_text .= $this->uniord(mb_substr ($text, $i, 1, "UTF-8")); } return $out_text; } } /** * Execute gateway commands * @access private */ function _execgw($command) { if ($this->sending_method == "curl") return $this->_curl($command); if ($this->sending_method == "fopen") return $this->_fopen($command); die ("Unsupported sending method!"); } /** * fopen sending method * @access private */ function _fopen($command) { $result = ''; $handler = @fopen ($command, 'r'); if ($handler) { while ($line = @fgets($handler,1024)) { $result .= $line; } fclose ($handler); return $result; } else { die ("Error while executing fopen sending method!<br>Please check does PHP have OpenSSL support and check does PHP version is greater than 4.3.0."); } } /** * Parse authentication command response text * @access private */ function _parse_auth ($result) { $session = substr($result, 4); $code = substr($result, 0, 2); if ($code!="OK") { die ("Error in SMS authorization! ($result)"); } return $session; } /** * Parse send command response text * @access private */ function _parse_send ($result) { $code = substr($result, 0, 2); if ($code!="ID") { die ("Error sending SMS! ($result)"); } else { $code = "OK - The message id is #$apiMsgId"; } return $code; } The only parts I've changed are: function send($to=null, $from=null, $climsgid=null, $si_url=null, $si_text=null) { /* Check SMS credits balance */ if ($this->getbalance() < $this->balace_limit) { die ("You have reach the credit limit!"); }; /* Check $to and $from is not empty */ if (empty ($to)) { die ("You did not specify destination address (TO)!"); } if (empty ($from)) { die ("You did not specify source address (FROM)!"); } if (empty ($si_url)) { die ("You did not specify the URL (URL)!"); } if (empty ($si_text)) { die ("You did not specify the message (Message)!"); } /* Reformat $to number */ $cleanup_chr = array ("+", " ", "(", ")", "\r", "\n", "\r\n"); $to = str_replace($cleanup_chr, "", $to); /* Pickup extra values */ $climsgid = $_POST["climsgid"]; $si_url = $_POST["si_url"]; $si_text = $_POST["si_text"]; $si_action = $_POST["si_action"]; /* Send Wap Push now */ $comm = sprintf ("%s/si_push?session_id=%s&to=%s&from=%s&climsgid=%s&si_id&si_url=%s&si_text=%s&si_created&si_expires&si_action=%s%s", $this->base, $this->session, $this->api_id, $this->user, $this->password, rawurlencode($to), rawurlencode($from), $climsgid, rawurlencode($si_url), $this->encode_message($si_text), $si_action, $concat ); return $this->_parse_send ($this->_execgw($comm)); } /** * Encode message text according to required standard * @param text mixed Input text of message. * @return mixed Return encoded text of message. * @access public */ function encode_message ($si_text) { if ($this->unicode != true) { //standard encoding return rawurlencode($si_text); } else { //unicode encoding $uni_text_len = mb_strlen ($si_text, "UTF-8"); $out_text = ""; //encode each character in text for ($i=0; $i<$uni_text_len; $i++) { $out_text .= $this->uniord(mb_substr ($si_text, $i, 1, "UTF-8")); } return $out_text; } } And the error I receive is : to check that PHP > 4.3 and server supports OpenSSL, which I know it does, because the first SMS part works. I have a feeling it's the way I've concatenated the string, which is causing the fopen error. So would really appreciate it if anyone had any suggestions as I'm really starting to pull my hair out >_< Thanks in advance
×
×
  • 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.