Jump to content

preetham

Members
  • Posts

    21
  • Joined

  • Last visited

preetham's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi. I want to call a PHP function (Defined in a Plugin) I am using this on wordpress by the way. Here is what i want to do. if($width>900) { plugin_function(); }
  2. Thanks.. I am still learning. I thought Logically in regular programming way. Thanks you clarifying . I am trying to check what is the width of the browser. Depending of which i have some action to be done. --
  3. Hi, I have to detect the Browser size in PHP. What is the best way? ---- What i have currently done is, $myWidth = '<script> document.write(window.innerWidth); </script>'; When i echo $myWidth , i get width, But i'm unable to do any function on that. ( ex, if , strcmp ) Also if do strlen($myWidth) i get 72. But echo gives me value "1366" , that lenght can't be 72. I am quite struck up here. Any help appreciated
  4. for storing it on my server, i can use file_exists itself. I'm having issue for remote images. Thanks for the advice, I will check on this asap.
  5. Thanks. This seems to be working fine. However, i see some performance issue, I mean , it takes 3 secs more time now. Is it because of this or something else?
  6. Hi, I am trying to check if image exits on some url, if so then display it. This works fine if I have image locally and use file_exists() When i pass url file_exits(), it fails. Any help appreciated.
  7. I'm not hard coding the link it comes from _GET, so like you said in first post, everything after # is ignored. I wanted to get that.
  8. No Typo. Did you try this code? <?php $mylink = $_GET["link"]; if( stripos($mylink,"Myntra.com")>0) { echo strpos($mylink,"#"); } ?> Bwowser treat "#" differently , this is a know issue. Try this echo (urlencode($mylink)); And when you check output, get this http%3A%2F%2Fwww.myntra.com%2Fsales%3Fnav_id%3D1 # and everything after that is ignored .
  9. Hello, I'm sorry. Actually, I didn't give complete info. This how i actually do it. I send this link as parameter to my file. http://www.myntra.com/sales?nav_id=1#!sortby=PRICEA <?php $mylink = $_GET["link"]; if( stripos($mylink,"Myntra.com")>0) { echo strpos($mylink,"#"); } ?> It doesn't work in this case.
  10. Hi, Both my previous questions were perfectly solved here. Hoping the same this time. Problem :How to find "#" symbol in a String (URL) example : URL = http://www.myntra.com/sales?nav_id=1#!sortby=PRICEA In above link, there is a "#" symbol used, however in code, when i do echo strpos("www.myntra.com/sales?nav_id=1#!sortby=PRICEA","#"); I don't get any value at all. How can i find the pos of "#" in url Thanks in advance.
  11. Thanks. I have implemented it and it works just fine. However, i have one thing to take care of, i.e , i want all these external links to open in new window. Can it be done in same js or create new one?
  12. ok. But what is impact if i don't encode first part?
  13. Yes. This solution did work for me, But i think we have to encode whole url. DO we need to encode complete url or just the one you have shown is enough?
  14. here is what it looks like. $tmp = "track.in.omgpm.com/?AID=999&MID=999&PID=999&CID=999&WID=999&UID=999&redirect=".$mylink."?utm_source=OMG&utm_medium=affiliate&utm_campaign=AID&aff=K5MHQM6"; I need to encode this and forward to this address. Please help
×
×
  • 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.