Jump to content

phpsane

Members
  • Content count

    295
  • Joined

  • Last visited

Community Reputation

0 Neutral

About phpsane

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

368 profile views
  1. Php Folkies, Look at this account activation script. It gets triggered when a new member clicks an account activation link he gets emailed. <?php //Required PHP Files. include 'configurations_site.php'; //Required on all webpages of the site. Must include here too. Else, conn.php data would not be found. conn.php residing in site_configurations.php. include 'header_site.php'; //Required on all webpages of the site. include 'header_account.php'; //Required on all webpages of the account. include 'sessions.php'; //Required on all webpages of the site. ?> <?php //Step 1: Check whether URL is in the GET method or not. //Perform following actions if URL is not in the GET Method and does not contain user Email and Account Activation Code. if(!isset($_GET["primary_website_email"],$_GET["account_activation_code"]) === TRUE) { //Give the User Alert that the Account Activation Link is Invalid. echo "Invalid Account Activation Link! Try registering for an account if you do not already have one! <a href="\"register.php\">Register here!</a>"; </p> exit(); } else { //Step 2: Check User submitted details. $primary_website_email = htmlspecialchars($_GET['primary_website_email']); $account_activation_code = htmlspecialchars($_GET['account_activation_code']); //2A. Check User Inputs against Mysql Database. //Select Username, Primary Domain and Primary Domain Email to check against Mysql Database if they are pending registration or not. $stmt = mysqli_prepare($conn, "SELECT username, account_activation_status FROM users WHERE primary_website_email = ? AND account_activation_code = ?"); mysqli_stmt_bind_param($stmt,'si',$primary_website_email,$account_activation_code); mysqli_stmt_bind_result($stmt,$username,$account_activation_status); //Perform the following if Account Activation Link was valid (the "Primary Website Email" and "Account Activation Code" match that were found via the GET Method). if(mysqli_stmt_execute($stmt)) && mysqli_stmt_fetch($stmt)) { //Perform the following if the "Account Activation Status is not found to be "0" (Account Activation Pending) on Mysql Database. if($account_activation_status = 1) { //Give the User Alert that their Account is already active. echo "Since you have already activated your account then why are you trying to activate it again ? Simply <a href="\"login.php\">log-in here</a>! "; exit(); } else { //Set Account Activation Status to 1 (1 = "Account Activated"; And 0 = "Activation Pending") on Tbl. $account_activation_status = 1; $stmt = mysqli_prepare($conn,"UPDATE users SET account_activation_status = ? WHERE username = ?"); mysqli_stmt_bind_param($stmt,'is',$account_activation_status,$username); if(mysqli_stmt_execute($stmt)) { //Give user Alert that their Account has now been Activated. echo <h3 style='text-align:center'>Thank you for your confirming your email and activating your account. <br> Redirecting you to your Home Page ...</h3> $_SESSION["user"] = $username; //Redirecting the newly Account Activated User to their Account Home Page by identifying the User by their Session Name (Username). header("location:home.php"); } } } else { //Perform following if Primary Website Email and/or Account Activation Code is not Pending Registration. $primary_website_email = htmlspecialchars($_GET['primary_website_email']); $account_activation_code = htmlspecialchars($_GET['account_activation_code']); //Give the User Alert their Email and/or Account Activation Code in the Account Activation Link is Invalid or the Account Activation Link is out of date (Email no longer registered in the Tbl). echo "Either this Email Address $primary_website_email was not pending registration with this Account Activation Code $account_activation_code or one or both of them are invalid! Or, the Account Activation Link is out of date (Email no longer registered in the Tbl). Try registering an account if you have not already done so! <a href=\"register.php\">Register here!</a>"; </p> exit(); } } ?> Shall I change this: //2A. Check User Inputs against Mysql Database. //Select Username, Primary Domain and Primary Domain Email to check against Mysql Database if they are pending registration or not. $stmt = mysqli_prepare($conn, "SELECT username, account_activation_status FROM users WHERE primary_website_email = ? AND account_activation_code = ?"); mysqli_stmt_bind_param($stmt,'si',$primary_website_email,$account_activation_code); mysqli_stmt_bind_result($stmt,$username,$account_activation_status); //Perform the following if Account Activation Link was valid (the "Primary Website Email" and "Account Activation Code" match that were found via the GET Method). if(mysqli_stmt_execute($stmt)) && mysqli_stmt_fetch($stmt)) { //Perform the following if the "Account Activation Status is not found to be "0" (Account Activation Pending) on Mysql Database. if($account_activation_status = 1) { //Give the User Alert that their Account is already active. echo "Since you have already activated your account then why are you trying to activate it again ? Simply <a href="\"login.php\">log-in here</a>! "; exit(); } to this where the mysqli_stmt_bind_result($stmt,$username,$account_activation_status) has been switched to a new spot: //2A. Check User Inputs against Mysql Database. //Select Username, Primary Domain and Primary Domain Email to check against Mysql Database if they are pending registration or not. $stmt = mysqli_prepare($conn, "SELECT username, account_activation_status FROM users WHERE primary_website_email = ? AND account_activation_code = ?"); mysqli_stmt_bind_param($stmt,'si',$primary_website_email,$account_activation_code); //Perform the following if Account Activation Link was valid (the "Primary Website Email" and "Account Activation Code" match that were found via the GET Method). if(mysqli_stmt_execute($stmt)) && mysqli_stmt_fetch($stmt)) { //Perform the following if the "Account Activation Status is not found to be "0" (Account Activation Pending) on Mysql Database. mysqli_stmt_bind_result($stmt,$username,$account_activation_status); if($account_activation_status = 1) { //Give the User Alert that their Account is already active. echo "Since you have already activated your account then why are you trying to activate it again ? Simply <a href="\"login.php\">log-in here</a>! "; exit(); }
  2. phpsane

    Grabbing User's Geo Ip

    Barand & Requinix, I found it here: https://stackoverflow.com/questions/12553160/getting-visitors-country-from-their-ip What you think now ? How-about trying to fix it since you deem it is not worthy at current state ?
  3. phpsane

    Grabbing User's Geo Ip

    Ok then. Might aswell sticck to geoip. However, Barand thinks the code on my original post is clumsy. Any chance you can weed-out the chaff and show me a better way to do it ?
  4. phpsane

    Grabbing User's Geo Ip

    Hey ? I don't know the code how to get php to detect the user's country correctly. Someone told me geoip is not the way to do it as it can be fooled. So, let us see how you folks would do things.
  5. phpsane

    Why Sha1 Needs To Be TypeCasted To String ?

    I been told I can try these: If Iwant an all-numeric string: $id = rand(10000000, 99999999); If I'd be okay with numbers plus the letters a-f: $id = uniqid(); If I wanted more variety and harder to spoof values, I might use: $id = substr(0, 16, base64_encode(md5(uniqid(null, true)))); If I want a decent variety and to make it easy to read/type by the user, maybe: $parts = array_fill(0, 4, 1); foreach($parts as &$part) { $part = rand(1000, 9999); } $id = implode('-', $parts); // $id is now something like "5475-1692-1301-2589" I actually like the look of this format: // $id is now something like "5475-1692-1301-2589" But, let's assume I get tonnes of users then there is a slight chance of collision. How to avoid it ? I can always add the user's Username like so: "requinix-1692-1301-2589" but then again we go back to mysql tbl column type "varchar" and I am trying to keep it at "Int". I think the best thing to do here is convert the Username's chars to INT where "a=1", "b=2" and so on. What you say about all this ? (Remember Usernames would be unique). Reason why I don't want too long a code is because I am going to force the User to read his code infront of his cam (while ID confirmation time) and people won't like reading too long a code or they could easily make mistake in reading the digits. Any other suggestions ? Or better. maybe I generate code in this format to avoid collisions: ID-Username-Gender-Zip-Mobile-City-Country-Year And ofcourse, convert all of that to INT where "a=1", "b=2" and so on. But then again, we're still back to square one where the user might read a digit wrong. have to eliminate that risk. Any ideas ? Or maybe, I just keep it like the following and forget converting the String to INT ? 01-requinix-female-ny7-0123456789-new york-usa-2018 What you opinion about all this ?
  6. phpsane

    Grabbing User's Geo Ip

    Ok. I quit.I'll have it your way then.Now, how are you gonna make sure that your members are fromn the country they say they are from ?Say, a guy from USA registers at your membership site (reg.php) and the reg.php prompts the user for his country and he selects Australia. Now, how you gonna force him to select his country truthfully ?Have you seen when you try visiting paypal.com then if you're from UK then it redirects you to paypal.co.uk ? Here, the user is not given any choice to select his country. Paypal auto detects the user's country. No surprise it would put an entry for that user in their mysql tbl "UK" as the user's country. Let's try doing something like that. Shall we ? And so, how to do it ?How-about a sample code from your end ? @requinix, You're welcome to show a code sample how you'd do things.
  7. Folks, Consider this link: http://requinix-proxy.com/?proxied_page=http://google.com Imagine you visited that proxied page. Now, would you be counted as the proxy's visitor or google.com's ? Good question, hey ?
  8. Gosh! That was a fast reply! After making this post, I was googling for "top 10 business forums" to get opinions of their users. Hopefully, I'll bump into some law people and get their opinions. Not gonna pay a lawyer $100/hr just to ask a few grey area questions and see the meter running on and on because they don't know what to make out of all this. Anyway, this business or website idea is not uniquely mentioned here. Indirectly, discussed it over at devshed forum where Catacaustic for over 6mths tried guessing what my business model is that would enable my users to earn money from the publicity of their browsing and keywords searching histories. Before I could finish the project somebody banned me over there without an explanation. Poor Catacaustic waited over 12 mnths patiently and anxiously for me to finish my project so he can checkout my website and learn the big secret that makes users earn more money (via the disclosure of their surfing histories) more $$$ than what they spend as consumers. Now, he will never learn whether I was serious or a bluffer. Nevermind. Anyway, I have you some questions for you. A. You replied: "3a. Don't break the rules." I ask: What rules ? B. And technically and by law, would this visitor count as barand.com's visitor or requinix-proxy.com's proxied page visitor ? C. Users at other forums around 2yrs back, told me that. websites won't just try suing me. Will send "desist notice" first via their lawyers. And, if I don't get any then I am good to carry-on.
  9. Folks, I want to ask you somethings about web proxies. QUESTION: 1. Do not proxies infringe on copyright ? If so, then why they legal ? Eg. Original Page: http://phpfreaks.com/php/user~requinix Proxied Page: http://proxy.com/proxy/?page=http://phpfreaks.com/php/user~requinix In this example, the proxying page "http://proxy.com/proxy/?page=" is infringing on the website and page: http://phpfreaks.com/php/user~requinix QUESTION: 2. Proxies place their own ads on infringed webpages and benefit from the visitors impressions or clicks. They attract visitors to their own or to their sponsor/advertiser ads using third party pages' infringed content. That is exploiting others' content for the proxy's commercial interests. Aren't their laws against such actions ? QUESTION: 3a. Imagine your web proxy logs all users' browsing histories and publicises them (with the users' consent) then would the websites they visited be able to sue the visitor or the proxy ? Eg. User "Gizmolo" visited "barand.com/samsung-galaxy/model-1.html" via requinix-proxy.com. Gizmolo visited: http://requinix-proxy.com/proxy/?page=http://barand.com/samsung-galaxy/model-1.html That visited page got publicized on the proxy's page that lists all users' browsing histories: http://requinix-proxy.com/proxy/users_browsing_histories.php Imagine you see a listing like this: Submission ID | Visitor (Proxy User) | Visitor (Proxy User) Contact Page | VISITED URL (proxied page) ------------------------------------------------------------- 0 | Gizmolo | http://requinix-proxy.com/user_contact_page/?user=gizmolo | http://requinix-proxy.com/?proxied_page=http://barand.com/samsung-galaxy/model-1.html 1 | PhpSane | http://requinix-proxy.com/user_contact_page/?user=phpsane | http://requinix-proxy.com/?proxied_page=http://ginerjm.com/dog_food/pack_1.htm As you can see from the 2 examples above, the web proxy's "User's Browsing Histories" List page is publicising what User browsed what. Now, note that, it is not directly publicising the third party webpages that each User browsed. Instead, it is listing the visited proxied pages. QUESTION 3b: My question is, can the third party website (in our example "barand.com") rightfully sue the web proxy (in our example "requinix-proxy.com) for revealing who their website visitor (in our example "Gizmolo") to the world in the public domain where the visited website's competitions get to learn who the visitor is and contact the visitor ? From our example, can barand.com claim: "You requinix-proxy.com not only revealed my visitors to my competitions but also gave the means to contact them and lure them over to their sites making me lose sales ?" When the proxy replies back with the following then would that save her backside ? "I did not directly send my user Gizmolo to your page but forwarded him to a proxied page and revealed he is a visitor of the proxied page. Plus, the proxied page is my own page since it's from my own domain. 1. And so, technically I did not reveal your website visitor to your competitions. Infact, I revealed my own proxied page (from my domain) visitor to your competitions. 2. It was my visitor's (Gizmolo's) wish that I reveal his browsing history to the world, including your competitions. Therefore, if you try dictating what your website visitor (consumer) can and cannot do then that dictation would be illegal itself and your brand will become unpopular. You have no right to dictate to me what I can and cannot do with my logs. It's my business. I own the copyright to the logs with the user's consent. Hence, it is my choice whether I sell them or give them away for free. I do not need your permission to reveal your website visitors to your competitions aslong as I got your visitor's permission to do so! Your visitor (my proxy user) benefited from such disclosure as it attracted your competition to my user and they made a better offer (via the User's "Contact Page" ) than you and my User was happy with my service as it helped him find a suitable seller fast. My service is to help businesses (websites) like your's find leads fast where consumers don't go hunting for sellers by visiting website after website but they only visit one or 2 websites and their competitions find my users on competition sites (via the Users' logs) and make better offers (via the User's "Contact Page) than the websites my users were browsing. You may do the same by glancing over my Users' logs to see who is on your competitions sites and likewise make better offers (via the Users' "Contact Pages) and find customer leads. Else, here is my proxy IP. Go and ban my proxy." QUESTION 3c: My question is folks, in this example, does the proxy have a chance to run legally such a proxy venture without getting sued by any website to where she sends her user (their visitor). And technically and by law, would this visitor count as barand.com's visitor or requinix-proxy.com's proxied page visitor ? Other programmers in other forums told me 2 years back that I don't have to worry about any website suing me. And so, even if I do not reveal logs like the following: 0 | Gizmolo | http://requinix-proxy.com/user_contact_page/?user=gizmolo | http://requinix-proxy.com/?proxied_page=http://barand.com/samsung-galaxy/model-1.html 1 | PhpSane | http://requinix-proxy.com/user_contact_page/?user=phpsane | http://requinix-proxy.com/?proxied_page=http://ginerjm.com/dog_food/pack_1.htm but, reveal like the following: 0 | Gizmolo | http://requinix-proxy.com/user_contact_page/?user=gizmolo | http://barand.com/samsung-galaxy/model-1.html 1 | PhpSane | http://requinix-proxy.com/user_contact_page/?user=phpsane | http://ginerjm.com/dog_food/pack_1.htm then, websites cannot legally sue me. (Note that, the 1st example publicises the visitied proxy pages while the latter publicise the direct webpages belonging to third party domains). They say, I should be more worried about my searchengine users suing me. They say consumers will lose privacy and attract spam and sue me. Back then, I told them I would run a searchengine that does all the above that I told you here my web proxy would do. Hence, they mentioned my searchengine and not proxy. I told them not to worry about my searchengine users and I am telling you too not to worry about my web proxy users as I will get their consent to do all this. Now, don't reply back to me "Good luck finding such users" because that is a different issue. Leave that to me. I know how to influence or motivate people to allow me to allow me to log their internet surfing histories and publicise them for their monetary gains. In short, my users won't sue me as I'm not only gonna help them shop better and attract better bargains and save money but help them earn money too. How help them earn money ? That is not the topic of this thread. The topic is, can websites sue me or not ? If they can then it is like saying you went to a brand and did not find anything and so went to an expert who advertised what your searching for and on the ad he wrote which brands and their models you've already viewed (so that these same brands don't contact you again or customise better bargains for you) and so the competitions can make better offers than the ones you rejected. And now, the rejected brands come and sue the product lead finding expert. You won't ever buy from these silly brands now will you ? They will become enemy number 1 to you. You know what, brands might not try suing in order to save themselves from becoming public enemy or consumer enemy number 1. Right ? What is your opinion aswell as conclusion on all this ? Interesting topic, hey ? Now you got something to ponder all night rolling right & left on your bed! Lol! Interesting topic, hey ? Now you got something to ponder all night rolling right & left on your bed! Lol! Do not forget to answer all my 6 questions by numbering them like I did when providing your answers. Ok ?
  10. phpsane

    Why Code Shows-Up in Block-Text Box ?

    Oops! Thanks! I need blocktext box input to remain should user get php echoing error due to any incorrect inputs in any fields of the form. And so, I coded it like this now: <div class="form-group"> <p align="left"><label>Page Description:</label> <textarea rows="10" cols="100" name="page description" required [A-Za-z0-9] autocorrect=off><?php if(isset($_POST['page_description'])) { echo htmlentities($_POST['page_description']); }?> </textarea> </p> </div> What do you think now ? Any good ?
  11. Folks, What is wrong with the block text with the label "Description" ? All html after or below it in the file shows-up inside the block-text box when you check the page in the browser! <form name "link_submission_form" method = "post" action="" enctype = "multipart/form-data"> <div class="form-group"> <p align="left"><label>Url:</label> <select> <option value="<?php echo "$primary_domain";?>"><?php echo "$primary_domain";?></option> </select> <input type="url" placeholder="<?php echo '/directory/page.html';?>" name="primary_website_url" required [A-Za-z0-9] autocorrect=off value="<?php if(isset($_POST['primary_website_url'])) { echo htmlentities($_POST['primary_website_url']); }?>"> <label>; Anchor Text:</label> <input type="text" placeholder="Enter Link Text" name="anchor_text" required [A-Za-z0-9] autocorrect=off value="<?php if(isset($_POST['anchor_text'])) { echo htmlentities($_POST['anchor_text']); }?>"> </p> </div> <div class="form-group"> <p align="left"><label>Page Title:</label> <input type="text" placeholder="Enter Page Title" name="page_title" required [A-Za-z0-9] autocorrect=off value="<?php if(isset($_POST['page_title'])) { echo htmlentities($_POST['page_title']); }?>"> </p> </div> <div class="form-group"> <p align="left"><label>Page Description:</label> <textarea rows="10" cols="100" placeholder="Page Description" name="page description" required [A-Za-z0-9] autocorrect=off value="<?php if(isset($_POST['page_description'])) { echo htmlentities($_POST['page_description']); }?>"> </p> </div> <div class="form-group"> <p align="left"><label>Primary Website Email (To receive Visitor Entry Alerts):</label> <input type="text" placeholder="Email to receive Visitor Entry Notice" name="primary_website_email_for_visitor_entry_notice" required [A-Za-z0-9] autocorrect=off value="<?php if(isset($_POST['primary_website_email_for_visitor_entry_notice'])) { echo htmlentities($_POST['primary_website_email_for_visitor_entry_notice']); }?>"> </p> </div> <div class="form-group"> <p align="left"><label>Repeat Primary Website Email (To receive Visitor Entry Alerts):</label> <input type="text" placeholder="Repeat Email to receive Visitor Entry Notice" name="primary_website_email_confirmation_for_visitor_entry_notice" required [A-Za-z0-9] autocorrect=off value="<?php if(isset($_POST['primary_website_email_confirmation_for_visitor_entry_notice'])) { echo htmlentities($_POST['primary_website_email_confirmation_for_visitor_entry_notice']); }?>"> </p> </div> <div class="form-group"> <p align="left"><label>Primary Website Email (To receive Visitor Exit Alerts):</label> <input type="text" placeholder="Email to receive Visitor Exit notice" name="primary_website_email_for_visitor_exit_notice" required [A-Za-z0-9] autocorrect=off value="<?php if(isset($_POST['primary_website_email_for_visitor_exit_notice'])) { echo htmlentities($_POST['primary_website_email_for_visitor_exit_notice']); }?>"> </p> </div> <div class="form-group"> <p align="left"><label>Repeat Primary Website Email (To receive Visitor Exit Alerts):</label> <input type="text" placeholder="Repeat Email to receive Visitor Exit notice" name="primary_website_email_confirmation_for_visitor_exit_notice" required [A-Za-z0-9] autocorrect=off value="<?php if(isset($_POST['primary_website_email_confirmation_for_visitor_exit_notice'])) { echo htmlentities($_POST['primary_website_email_confirmation_for_visitor_exit_notice']); }?>"> </p> </div> <div class="form-group"> <p align="left"><label>Agree To Our Terms & Conditions ? :</label> <input type="radio" name="fb_tos_agreement_reply" value="Yes" <?php if(isset($_POST['fb_tos_agreement_reply'])) { echo 'checked'; }?> required>Yes <input type="radio" name="fb_tos_agreement_reply" value="No" <?php if(isset($_POST['fb_tos_agreement_reply'])) { echo 'checked'; }?> required>No </p> </div> <p align="left"><input type="submit" class="btn btn-default" name="submit" value="Submit"></p> <p align="left"><input type="reset" class="btn btn-default" name="reset" value="Reset"></p> </form> Notice each input field's requirement. Have I got any wrong ? Example: <input type="text" placeholder="Enter Link Text" name="anchor_text" required [A-Za-z0-9] autocorrect=off value="<?php if(isset($_POST['anchor_text'])) { echo htmlentities($_POST['anchor_text']); }?>">
  12. phpsane

    Grabbing User's Geo Ip

    Ha! Ha! I knew both files were using different languages (based on their file extensions) and don't needed to be educated to figure that out. It's just I don't know this json thing and couldn't figure-out why they didn't just add each entry on a line by themselves on the php one like the json one. Why switch langs just to have each entry on lines by themselves ? What's the real significance ? Unless ofcourse the json one is doing some other tasks in the background which an open human eye fails to catch.
  13. phpsane

    Grabbing User's Geo Ip

    Php Whizzes! Need to grab geo ip. Why these 2 show data differently ? http://www.geoplugin.net/json.gp?ip=19.117.63.253 http://www.geoplugin.net/php.gp?ip=19.117.63.253 Which one you like ? I like 1st one. Anyway, is this code any good ? Will it misfire ? <?php //https://stackoverflow.com/questions/12553160/getting-visitors-country-from-their-ip function ip_info($ip = NULL, $purpose = "location", $deep_detect = TRUE) { $output = NULL; if (filter_var($ip, FILTER_VALIDATE_IP) === FALSE) { $ip = $_SERVER["REMOTE_ADDR"]; if ($deep_detect) { if (filter_var(@$_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP)) $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; if (filter_var(@$_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP)) $ip = $_SERVER['HTTP_CLIENT_IP']; } } $purpose = str_replace(array("name", "\n", "\t", " ", "-", "_"), NULL, strtolower(trim($purpose))); $support = array("country", "countrycode", "state", "region", "city", "location", "address"); $continents = array( "AF" => "Africa", "AN" => "Antarctica", "AS" => "Asia", "EU" => "Europe", "OC" => "Australia (Oceania)", "NA" => "North America", "SA" => "South America" ); if (filter_var($ip, FILTER_VALIDATE_IP) && in_array($purpose, $support)) { $ipdat = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=" . $ip)); if (@strlen(trim($ipdat->geoplugin_countryCode)) == 2) { switch ($purpose) { case "location": $output = array( "city" => @$ipdat->geoplugin_city, "state" => @$ipdat->geoplugin_regionName, "country" => @$ipdat->geoplugin_countryName, "country_code" => @$ipdat->geoplugin_countryCode, "continent" => @$continents[strtoupper($ipdat->geoplugin_continentCode)], "continent_code" => @$ipdat->geoplugin_continentCode ); break; case "address": $address = array($ipdat->geoplugin_countryName); if (@strlen($ipdat->geoplugin_regionName) >= 1) $address[] = $ipdat->geoplugin_regionName; if (@strlen($ipdat->geoplugin_city) >= 1) $address[] = $ipdat->geoplugin_city; $output = implode(", ", array_reverse($address)); break; case "city": $output = @$ipdat->geoplugin_city; break; case "state": $output = @$ipdat->geoplugin_regionName; break; case "region": $output = @$ipdat->geoplugin_regionName; break; case "country": $output = @$ipdat->geoplugin_countryName; break; case "countrycode": $output = @$ipdat->geoplugin_countryCode; break; } } } return $output; } echo ip_info("119.30.32.215", "Country"); ?><br><?php echo ip_info("119.30.32.215", "Country Code"); ?><br><?php echo ip_info("119.30.32.215", "State"); ?><br><?php echo ip_info("119.30.32.215", "City"); ?><br><?php echo ip_info("119.30.32.215", "Address"); ?><br><?php print_r(ip_info("119.30.32.215", "Location")); // Array ( [city] => Menlo Park [state] => California [country] => United States [country_code] => US [continent] => North America [continent_code] => NA ) ?> What you say ? Lemme see your sample code. Thanks!
  14. phpsane

    Help Me Sanitize

    No. Spacebar key along with others (eg, x,w,2,etc.) malfunction from time to time then few days later start working again. Only this time Spacebar taking long time to come around again. Right now x works but not SHIFT x (to CAPITALISE). But SHIFT T, etc. works and so SHIFT button is working. Have to press CAPS then x to CAPITALISE X. Also, one ENTER works but not the other! https://www.google.com/search?q=solved-spacebar-not-working-windows-10&amp;oq=solved-spacebar-not-working-windows-10&amp;aqs=chrome..69i57j69i60.3922j0j4&amp;sourceid=chrome&amp;ie=UTF-8
  15. phpsane

    Help Me Sanitize

    Mmm. After 2 nights I see no helping responses. Anyway, looking at this: http://php.net/manual/en/filter.filters.validate.php I realize this exist: FILTER_SANITIZE_STRING But not this: FILTER_VALIDATE_STRING And, I realize this NO exist: FILTER_SANITIZE_DOMAIN But this DOES: FILTER_VALIDATE_DOMAIN Am I on right track ? I thought for every SANITIZE there is a VALIDATE and vice-versa. But, I was wrong 2 nights ago to think like that. Correct ?
×

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.