Find Jobs
Hire Freelancers

send / receive strings javascript/AJAX/php

$10-30 USD

已完成
已发布超过 10 年前

$10-30 USD

货到付款
i'm trying to send a string from javascript to php where the string will be written to a text file. here's the relevant parts of the javascript: <html> <script type=""text/javascript""> // Javascript function getRequest() { var req = false; try{ // most browsers req = new XMLHttpRequest(); } catch (e){ // IE try{ req = new ActiveXObject("[login to view URL]"); } catch (e) { // try an older version try{ req = new ActiveXObject("[login to view URL]"); } catch (e){ return false; } } } return req; } function sendWords( wordsString ) { var ajax = getRequest(); [login to view URL] = function(){ if([login to view URL] == 4){ alert([login to view URL]); } } [login to view URL]('frmOne').action="[login to view URL]"; var jsonText = [login to view URL](wordsString); [login to view URL]("GET", "[login to view URL]", true); [login to view URL]("wordsString="+jsonText); } function getWords() { var ajax = getRequest(); [login to view URL] = function(){ if([login to view URL] == 4){ words = [login to view URL]; } } [login to view URL]("GET", "[login to view URL]", true); [login to view URL](null); } </script> <?php ?> <FORM NAME="frmOne" id="frmOne" Method = "GET" Action = ""> </html> at the moment, i'm still stuck trying to get the sendWords function working. this is [login to view URL]: <?php if(isset($_GET["wordsString"])) { $jsonVal=json_decode($_GET["wordsString"]); file_put_contents("[login to view URL]", $contents); } ?> when I can save the string variable, I also need to be able to read the file contents in php + retrieve the string in the getWords function. this is [login to view URL]: <?php $file_handle=fopen("[login to view URL]", "r"); $returnString=fgets($file_handle); fclose($file_handle); return $returnString; ?>
项目 ID: 5136522

关于此项目

9提案
远程项目
活跃10 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
颁发给:
用户头像
Hi Paul It's actually a fairly easy job to do, but I don' t really understand why do you want to use json for this, since json requires the json extension to be installed into the server (which doesn't always happen) ... I mean, if you want it json, it can be json, not a problem, but otherwise I'd rather suggest you should use simple text, of course, encoded so that it can be sent to the php script without any issues ... Regards Dragos
$44 USD 在0天之内
5.0 (189条评论)
6.5
6.5
9威客以平均价$33 USD来参与此工作竞价
用户头像
A proposal has not yet been provided
$55 USD 在1天之内
4.9 (349条评论)
6.9
6.9
用户头像
A proposal has not yet been provided
$27 USD 在1天之内
5.0 (27条评论)
4.1
4.1
用户头像
Hello, I have read through your project and I am incredibly interested in taking on your project. I am an experienced developer with a diploma in the field of web develment. I have been working in the field of web development for roughly 7 years. I take great pide in my work and deliver only the best quality. My skill-set includes... -PHP -HTML5 -CSS -Responsive Design -Wordpress I look forward to hearing from you and hopefully we will have the opportunity to work together. Thank you, Meagan S.
$40 USD 在3天之内
5.0 (4条评论)
2.7
2.7
用户头像
hi, we can use ajax jquery call for this. This is a functions which I am using in my developments in all the time. So I can manage this easily & complete this soon. I am doing javascript & its related technologies for more than 3 years. So I can provide more help whenever you needed. thank you
$30 USD 在2天之内
0.0 (0条评论)
0.0
0.0
用户头像
Hello Sir, I have gone through your requirement, I can do this ASAP, as per your time line.I need a OPPORTUNITY. Thanks
$29 USD 在3天之内
0.0 (0条评论)
0.0
0.0
用户头像
Greetings from SoftMeet Technologies, SoftMeet Technology is professional web development and offshore outsourcing company based in Kochi , South India . We offer a wide range of services to reach your targeted audience and share your valuable information focusing on retaining your customers. Our service includes Web application development, Website designing, Corporate profiles and presentations, E-commerce solutions, Application development, maintenance, and re-engineering, Mail gateways, Web hosting solutions, Search Engine Optimization, Mobile Web and application development, Handheld and Smart phones Applications and Flash development etc.
$25 USD 在1天之内
0.0 (0条评论)
0.0
0.0

关于客户

UNITED KINGDOM的国旗
Chelmsford, United Kingdom
5.0
1
付款方式已验证
会员自11月 17, 2013起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。