PHP - Moved: Display Chinese Charaters In Webpage
This topic has been moved to HTML Help.
http://www.phpfreaks.com/forums/index.php?topic=309827.0 Similar TutorialsThis topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=321950.0 I would like to know how I can use the code below to indicate only a range of 5 to 10 characters. Code: [Select] else if(strlen($_POST["username"]) 5,10){ echo "<p> </p><p> </p><p> </p><br />Please go back, USERNAME is too short! MUST BE BETWEEN 5 to 10 characters.<p> </p><p> </p><a href='javascript:javascript:history.go(-1)'>Click here to go back to previous page</a>"; Thanks Hi, I'm sorry to bother you with this request for help. I bought a XML driven Flash website template with an integrated contact form. Even though the contact.php seems pretty secure I receive emails telling me that someone tried to send emails but they contained no recipient addresses, and therefore no delivery could be attempted. So far, it seems as if the validation process in the php and preg_match command seem to work. Never the less those messages keep getting on my nerve. The Failed delivery emails I get look like this: ---------- Date: Mon, 20 Dec 2010 08:12:09 +0100 Message-Id: <E1PUZuj-0005zp-8c@mydomain.com> To: Subject: X-PHP-Script: www.mydomain.com/contact.php MIME-Version: 1.0 Content-type: text/html; charset=windows-1251 From: ---------- As you can see spam protection by filtering the email characters with preg_match has its limits too. The interesting thing is that the sender (E1PUZuj-0005zp-8c) is (of course) changing but only in the last digits. I received about 200 emails with exact the same beginning. So the bot seems to follow an ongoing pattern. I wonder now, if there is a way to set a command to exclude (or to preg_match the exact) character combinations like "E1PUZ" which lead to not sending the email? I know ... it is only a matter of time till the combinations are different but altering the php code once a month is not as much work as deleting all those failed delivery messages per day. I have got connection to the the mysql database, how do I get the data from the database to display on the webpage This is the query which should likes salestrack productid with printers productid, but even though there are data no result is showing and I really dont know why. Please help Code: [Select] SELECT salestrack.orderid AS orderid, salestrack.salesman AS salesman, printers.rrp AS price, salestrack.name AS name, salestrack.phone AS phone, salestrack.email AS email, printers.name AS printername, salestrack.orderdate AS orderdate, salestrack.status AS STATUS FROM printers, salestrack WHERE salestrack.productid = printers.productid AND salestrack.status = 'OPEN' ORDER BY salestrack.orderdate i have a register and login page where the users can perform register and login task and their detail gets saved in the database. my requirement is that when the user enters his/her account, they should be redirected to their profile page, where they can view all their profile details. Till now i have been able to make the user login and dislay a part of their profile page, for this purpose the code that i am using is
<code>
<?php This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=319610.0 This topic has been moved to Other. http://www.phpfreaks.com/forums/index.php?topic=316401.0 Hi, I am using the following code to send chinese characters via GET variable $x = $transarr['Area']; // This contains chinese character read from a utf-8 text file header("location: ++a.php?ab=$x"); in ++a.php file, the following code returns correct chinese characters in Mozilla Firefox, but in Internet Explorer, it shows "???". Anybody has any idea, please? echo $_GET['ab'] I need to scrape a Chinese website. (I guess there is no difference between scraping a Chinese website and a normal one?) It's my suppliers weblink. They have have told me to download images and text from their website profile link off 1688.com. There is an API - but from what I've read, it's pants + my virus checked doesn't allow me to visit the API doc page. What tool should I use? I've got lots of experience coding - but master of none. Maybe I still fall into the newbie category. LOL. I saw a link from an article... they gave these names:
Goutte Which should I consider? IMPORTANT: I need to download and then upload into my Woocommerce website. I need images + variation details. I'll have a little file with translations, so if XYZ is found in Chinese, then it is replaced with this. I thought I would mention the extra detail incase it was relevant to considering which scraping tool to pick. Thanks! Edited July 11, 2019 by acebase I have a string of mixed Japanese or Chinese and Western characters and I would really like to leave the western characters and remove the others. Is there any way to detect which UTF-8 characters are Japanese/Chinese and to remove them? I have tried to use this which I found on another thread but my version of PHP (5.3) will not allow the /u in the following Code: [Select] echo "<BR>".preg_replace('/[^\u4E00-\u9FFF]+/', '', $string); I have tried using various combinations of /p (these, plus others) Code: [Select] echo "<BR>".preg_replace('/\p{Bopomofo}+/u', '', $string); echo "<BR>".preg_replace('/\p{Hiragana}+/u', '', $string); and the /x{} option tells me the numbers are to large Code: [Select] echo "<BR>".preg_replace('/[^\x{4E00}-\x{9FFF}]+/', '', $string); My string for this example is this but any combination of western and Japanese/Chinese characters are possible in the title. 2011.12.06 19:00-20:00 / ふくいちライブカメラ (Live Fukushima Nuclear Plant Cam) | Uploaded: 06 Dec 2011 Thanks for any help. This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=342944.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=332434.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=332709.0 try { echo "<br>"; foreach($dbh->query("SELECT * FROM test_shot WHERE sold=1 ORDER BY year ASC") as $row) { if($row['picture'] != "" && $row['picture'] != null) { echo "<div class='image-holder'><img src ='".$row['picture']."' width=300px /><br>"; } if($row['year'] != "" && $row['year'] != null) { echo $row['year']; } if($row['description'] != "" && $row['description'] != null) { echo $row['description']; } if($row['sold'] == 1) { echo "<img src='images/sold1.png'><br>";//Add your image code here } elseif ($row['sold'] == 0) { echo "</div><br>"; } } } catch (PDOException $e) { print $e->getMessage(); } ?>
This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=314226.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=350021.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=308032.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=342917.0 |