Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

36 Excellent

About gongpex

  • Rank

Previous Fields

  • Languages
    PHP, Java, javascript, CSS,HTML
  1. Hello everyone, Long time no see, how are you? Just ask I've follow these links to set SSL on nginx server localhost for windows : #user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' #
  2. Hello everyone, I got bug when upload image with name too long, the filename out from input file like image below: Q : how to fix so that filename not out from input? Please help thanks.
  3. Hello everyone, Long time no sees I hope y'all fine, I get some issue with regular expression if the pattern come from variable, these my codes : var data_code = $("#phone).attr('data-code'); var phone_number = '+61111111'; //if I use code like these : phone_number = phone_number.replace(/^\+61/,''); console.log(phone_number) // would return 11111111 === this is expected result but when I tried : var pattern = "^'\'"+data_code; //I assumed this equal with : ^\+61 var regx = new RegExp(pattern,"g"); phone_number = phone_number.replace(regx,''); would return '+611111
  4. Hello everyone, I have code: $a = ' asasc #aaa cscv #ccc'; if (preg_match('/\#(\w+)/',$a, $matches)) { print_r($matches); } this result are : Array ( [0] => #aaa [1] => aaa ) that result is not my expectation, my expectation if the result : Array ( [0] => #aaa [1] => #ccc ) Q : So in other word how to make so that preg_match return only the word start with # only. please someone help me Thanks
  5. Hello everyone, I've tried number of time to get json data using jsonp from another domain, here is my full code : <script type="application/javascript" src="https://i.instagram.com/api/v1/tags/search?q=burger&callback=mycallback"></script> <script type="text/javascript"> $(document).ready(function() { test(); }); function test() { $("#test").click(function(){ $.ajax({ crossDomain: true, type: "GET", url: "https://i.instagram.com/api/v1/tags/search?callback=mycallback", dataType: "jsonp", // jsonp jsonp : 'callback',
  6. Hello everyone, I had used pregmatch to filter code calling with this code : if(preg_match('/^[61][0-9]*$/',$number)){ echo 'sorry you cannot use +61 to enter phone number use 123xxxx instead'; } it would filter if user giving number +61xxxxxx , but if they put number 2222222 it wouldn't filter and this is correct, the problem actually when user put number leading with 1 for example 12345678 it would filter or displaying echo. Q : How to filter so that when user put +61xxx only not 1xxxxx it would be run? Note : I provided input field so that user put the
  7. Hello, Thanks for reply, Q : Can I use cookie or session that provided by instagram through ajax or other lang such PHP maybe? Thanks again.
  8. Hello, thanks for reply, I've log in already when I used that ajax code, but still on the network XHR result like on above, it need me to log in although I've logged in already, A : If you not objection please try it, if you have instagram account log in first and then use that code to access it to get some data. That's all I can ask from you.. I would really appreciate it, because I really need this API. Many Thanks
  9. Hello, thanks for reply, I've open according on that link but it redirect to www.instagram.com and my account. Note : When I tried this code I was logged in on my instagram account but it still said : login required, please see my network console : Request URL: https://i.instagram.com/api/v1/accounts/current_user?csrfKey=31611c89600aee8c6758f088c51bb00f Request Method: GET Status Code: 301 Remote Address: Referrer Policy: no-referrer-when-downgrade /* redirect to */ Request URL: https://i.instagram.com/api/v1/accounts/current_user/?csrfKey=31611c89600aee8c67
  10. Hello thanks for reply, please use this code : var settings = { "async": true, "crossDomain": true, "url": "https://i.instagram.com/api/v1/fbsearch/places", "method": "GET", "headers": {}, "data": "{'q':'london'}" } $.ajax(settings).done(function (response) { console.log(response); }); not entire code can be accessed, it need login, if this code executed it would result ajax response code 302 and then redirect to 301 finally 200 with link : https://www.instagram.com/accounts/login/?next=/api/v1/fbsearch/places/%3Fq%3Dlondon%26%257B%257D N : thing what I n
  11. Hello everyone, long time no see I hope y'all fine, Today I tried to use i.instagram api according on this source : https://instagram.api-docs.io/1.0/accounts There is no enough documentation on that link, so when I tried to connect to got some data it refused and asked login as credential. Q : Is there somebody ever used this API ? please answer Thanks
  12. Hello everyone, Just ask, usually we use : www.example.com, .net, .cc, .info and etc. Q : How to create domain name extension like www.example.aa, www.example.gong or etc and own it ? please answer Thanks
  13. Hello everyone First of all : Happy New Year 2019 hope y'all successful to achieve y'all's target in this year. I created code to test namespace and use in php like this : <?php namespace Base; class Section{ function test(){ echo 'aaa'; } } ?> file on above is Section.php <?php namespace Base2; class Base2 extends Base\Section { function test(){ $class = new Section(); $class->aaa(); } } $ans = new Base2(); $ans->test(); ?> this file is : Base2.php when I run Base2.php it always Fatal error: Class 'Base2\Base\Section' not
  14. Hello Thanks for reply. Today when I asked my hosting provider about why my ajax upload process is pending / staled they answered me : "are you using script to sending data? it's probably blocked by free hosting BOT blocked" Q : is this possible the main cause why my ajax process pending / stalled ? because when I run my code (used post method) on localhost it able to sent as well. please reply Thanks
  15. Hello everyone, it's possible or not to use 'GET' method to send data from ajax multipart form data like this : var formData = new FormData( $("#fm")[0]); $.ajax({ type : "GET", cache: false, contentType: false, processData: false, url : "<?php echo base_url('index.php/update/do_update');?>", dataType : "json", data : formData, success : function(response){ alert('posted'); } }); Currently I used method 'POST' to send data, but it cause pending / stalled on XHR so all the process aborted. Q1 : if the method must be 'POST' only , could you tell me th
  • Create New...