-
Posts
471 -
Joined
-
Last visited
-
Days Won
8
Everything posted by dalecosp
-
+1 for a development environment. I use Oracle's Virtualbox and install a BSD-family OS with Apache+PHP ... you might be able to even find a Docker container or something like that for free out there someplace. As far as what will happen, the biggest recent changes to PHP, in terms of effect, at our company were removing the old mysql_* stuff (although most of it was long gone, we found out that some infrequently-used LAN software and reports still had some mysql_* stuff in them, and the removal of mcrypt().
-
Drag 'n drop is done with an AJAX system; a JavaScript front-end script packages the image data into a FormData object, and the AJAX operation will POST that to a PHP handler script on the server, which then does the work to put it someplace just like we did in the Elder Days when we used a basic upload form in HTML. So, at the very least you need two scripts, one PHP and one in JS.
-
It would also be possible to post-process all the URLs on the page with JavaScript, but who wants to take time to do THAT?
-
Pretty URLs are fairly simple. Either use mod_rewrite (for Apache servers) or its equivalent on your system to do the complete work, or use it to redirect to a centralized script that reads the URL parameters and shows content based on that parameter. At work, we have listings like: www.ombe.com/listing/2151404/Uninet-Developer-for-use-in-Ricoh-Aficio-200,-250,-345g mod_rewrite has this rule: RewriteRule ^listing/([0-9]+)/?.*$ listing?$1 [NC,L] "Listing" does something like this: $product_num = intval($_SERVER['QUERY_STRING']); Of course there's a LOT more, config and security modules before this point, and error handling for invalid query strings, and so on.
-
Small business needs help creating PHP interview questions
dalecosp replied to aadamsx's topic in PHP Coding Help
Well, the reason all the example are short ... you're not really likely to find someone who wants to code the equivalent of an entire app for the purposes of a job interview. What's wrong with them bringing code to you, providing Github links, etc.?- 7 replies
-
- application
- full-stack
-
(and 1 more)
Tagged with:
-
How to fetch sqlite data on another page
dalecosp replied to ersaurabh101's topic in Other RDBMS and SQL dialects
What's the console saying? Perhaps you could add some more console.log() statements if these aren't firing and giving you any clues. -
how make a similar website on a CMS similar to WordPress
dalecosp replied to Harrisparker's topic in Applications
Looks like a Bootstrap site. -
As far as .htaccess goes, it should be fairly simple, as long as you're talking about a few specific files. <Files /foo> deny from 1.2.3.4 </Files>If you have multiple pages you probably need "FilesMatch" and a regexp.
-
Welcome to PHPFreaks!
-
Need help with SMS API Integration In PHP
dalecosp replied to UnknownAX101's topic in PHP Coding Help
It should be a bit simpler; they are allowing GET requests. Here's a sample you can adapt to your site's architecture: <?php $uid = "My_Userid"; // put your user id here $pass = "My_Password"; // put your password here $apikey = "My_API_Key"; // etc. $from = "My_From_Phone_number"; $to = "Receiving_Number"; $msg = "Test text Message."; $url = "https://www.experttexting.com/exptapi/exptsms.asmx/SendSMS?Userid=" . $uid . "&pwd=" . $pass . "&APIKEY=" . "&FROM=" . $from ."&To=" . $to . "&MSG=" . $msg; $send = file_get_contents($url); //simple HTTP GET request -
You're welcome! Good luck with your project :-)
-
The fact it's not working on iPad suggests a browser problem, and, therefore by extension, a JavaScript problem? Can you get a console from the iPad browser and see if JS is throwing some errors? Alternatively, there are "user-agent switchers" for most major browsers that might allow you to imitate an iPad with a browser (Like Chrome or FFox) that has a good console/debugger already built in.
-
You're echoing "$out" inside the foreach loop ... and you're also concatenating to it with ".=" ... I think you probably want to put the echo statement AFTER the foreach loop? (That is, after the first bracket and before the bracket that closes your function.)
-
I'd try preg_match(): function insertTweets($name,$screen_name,$text,$created_at,$id_str,$followers_count){ $get_hashtags = preg_match("%#[\w_]*\s%",$text,$tags); //now $tags is an array of hashtags //etc...
-
Should interfaces be applied to end class or extended classes?
dalecosp replied to NotionCommotion's topic in PHP Coding Help
You've Googled? http://www.killerphp.com/articles/php-interfaces/ http://kristopherwilson.com/2015/03/26/using-interfaces-effectively-in-php/ http://www.davegardner.me.uk/blog/2010/11/21/why-you-should-always-use-php-interfaces/ (Older, fanatic OOPer) http://jaskokoyn.com/2013/06/11/interfaces/ https://www.phpclasses.org/blog/post/300-Using-PHP-Object-Interfaces.html If there's a class that you want to *ensure* has specific capabilities (that is, you don't want to forget to implement the $foo method for it), have it implement an interface. -
Barand's a great guy ... first "met" him at another site many years ago. Always a class act --- a decent fellow with a good handle on many subjects. Congrats, man.
-
<?php //all your curl stuff here print_r(curl_getinfo($ch)); Might give some kind of clue.
-
If 3 of us think it is, it must be so!
-
Hmm. Since "not telling" is a valid gender option here, it's kind of hard to know. Here are a few users with > 250 posts who ID as female: http://forums.phpfreaks.com/user/27180-jessica/ http://forums.phpfreaks.com/user/131799-white-lily/ http://forums.phpfreaks.com/user/56876-priti/ http://forums.phpfreaks.com/user/87108-lingo5/ And another with few posts: http://forums.phpfreaks.com/user/32377-daena76/
-
If it's anything besides "target='_blank'" ... I agree.
-
Sounds pretty nefarious, doesn't it? Given he's also shot-gunned this by asking at PHPBuilder, I do have to wonder about intentions. What if he's asking "How can I show someone else's site in a IFRAME so that they think they're using another site by they're really still using my site ..." Yikes....
-
The best framework to learn is the one your new job requires. They seem to come and go even faster than Donald Trump's wives...
-
help me: php & simple_htm_dom for recursive scraping
dalecosp replied to Mau-Ro's topic in PHP Coding Help
There are some problems with your script, as near as I can tell at first glance. 1. The array $list_pre was initialized with URL that included an empty variable. Either just initialize an empty array, or make sure that $keyword3 has a value when the array is initialized. 2. The first "foreach" loop isn't followed by a bracket. I'm not sure what the parser will do with that; it might not matter, but for consistency and legibility I would recommend that every foreach use brackets. 3. You have an errant semicolon here: It's possible that's the source of the issue.