Jump to content

supertrucker

Members
  • Content Count

    171
  • Joined

  • Last visited

Community Reputation

0 Neutral

About supertrucker

  • Rank
    Member
  • Birthday 07/24/1978

Previous Fields

  • Languages
    Learning, forgetting, and learning again: Java,PHP, HTML/XHTML, SQL, Pascal

Profile Information

  • Location
    The sticks, Michigan!
  • Interests
    Gadgets that beep and make noise, my children, my bike, and getting lost on the internet.
  1. Wow, I feel a little dumb now! I was calling the method with '::' instead of '->', thanks!
  2. Hello,I have written a custom class that is going to handle all of my CRUD operations for my "user" table. Below is the class: <?php class UserDb { const TABLE = "users"; const KEY_ID = "Id"; const KEY_EMAIL = "email"; const KEY_JOIN_DATE = "joinDate"; const KEY_VERIFIED = "verified"; const KEY_LAST_LOGIN = "lastLogin"; const KEY_FIRST_NAME = "firstName"; const KEY_LAST_NAME = "lastName"; const KEY_PASSPHRASE = "passphrase"; private $db = null; public function __construct() { $this->db = new PDO( 'mysql:host=' . HOST_NAME . ';dbname=' . DATABASE_NAME . ';
  3. I'm trying to add an RSS feed engine to my site. I have the meat and potatoes portion completed, now I need the engine that syndicates them. Here's the example from the W3Schools site: <?xml version="1.0" encoding="ISO-8859-1" ?><rss version="2.0"><channel> <title>W3Schools Home Page</title> <link>http://www.w3schools.com</link> <description>Free web building tutorials</description> <item> <title>RSS Tutorial</title> <link>http://www.w3schools.com/rss</link> <description>New RSS tutorial on W3Schoo
  4. Any ideas on how to back up a db on a hosted platform? It has phpadmin for the user interface, but I'm at a loss for the best method of backing this up, short of exporting each table manually...
  5. In theory you are correct, but there, unfortunately, are scenarios where developers don't follow the typical rules. Here's a standard favicon declaration: <link rel="shortcut icon" href="favicon.ico" /> Sometimes, I've seen people do this: <link rel="shortcut icon" href="/images/favicon.ico" /> Or even this: <link rel="shortcut icon" href="myicon.ico" /> So, best practice would probably, I'm assuming, be to do a preg_match for the "myicon.ico". My problem is just that I seem to be struggling with reg exps.Tips?
  6. Thanks guys, Teng84 hit it on the nail, never ran across those functions before, very handy!I run a very large mobile internet directory, and some of the links are in the formats listed above. That's why I needed to be able to break each link down, so I can display their pretty icons. I have it working now, but I'm not entirely happy with my quick fix. I need to write a preg_match statement. Anyone decent at writing reg exp's? I tried and butchered it.
  7. supertrucker

    Url Function

    Perhaps I'm over thinking this, but here is the scenario:Link 1: http://www.example.comLink 2: http://www.example.com/Link 3: http://www.example.com/index.phpLink 4: http://www.example.com/index.php?var=123Link 5: http://www.example.com?var=123All of these links are pointing to the exact same location, but they are all different. I need a method to break down any version to just the http://www.example.com so I can append the address to http://www.example.com/favicon.ico.Things get even more confusing with addresses like:1: http://www.example.com.au/2: http://www.example.com.au/dir/index.php?v
  8. I guess I need to do a little reading up on Javascript. When it comes to mobile applications, using Javascript isn't practical since not all mobile browsers support it. However, that's beginning to change as the newer phones sport more advanced browsers. Even most of the dumb phones I've had included a simple subset of Javascript, but I've never read anywhere when it's okay to use it for mobiles, just always do what you can for the user server side.For personal use, however, I will have to play around with it and see what cool stuff I can do client side.Thanks for the support!
  9. The solution is solved, but if you're curious, the intent was the following:1. A bookmarklet uses Javscript to forward the current page address to extract.php.2. Extract.php uses cUrl to extract the pages meta data.3. Extract.php forwards this new information to a link submission form, submitlink.php.4. Submitlink.php receives the data and prefills out a form with the data collected. User reviews data and submits the data.Works great now that I'm using $_sessions like I should have from the get go! Of course, now that I think about it, couldn't javascript have been used to extract all the me
  10. The solution is solved, but if you're curious, the intent was the following:1. A bookmarklet uses Javscript to forward the current page address to extract.php.2. Extract.php uses cUrl to extract the pages meta data.3. Extract.php forwards this new information to a link submission form, submitlink.php.4. Submitlink.php receives the data and prefills out a form with the data collected. User reviews data and submits the data.Works great now that I'm using $_sessions like I should have from the get go! Of course, now that I think about it, couldn't javascript have been used to extract all the me
  11. Thanks for the reply, I was thinking about this one way too hard! Used Sessions, problem solved, hate it when that happens!
  12. That's just it, how do you preserve post data with a redirect?
  13. Is there a way to send POST data with the header function? I.e., right now, I'm doing this:header("Location: http://blah.com?reallylongdatahere");...which is breaking, I'm assuming because the GET method I'm using has a 100 character limit. Any ideas?
  14. Thank you, that second link has a very well put together explanation!
  15. I'm having trouble understanding how the preg_match function works, furthermore, the code examples I read further confuse me! I use this code below as part of a "bookmarklet" for my site, but the code was essentially copy and pasted (it's utilizing cUrl functions). I basically understand what the preg_match function does, it parses text. What I don't understand is how get it to do what you want. The code below works for getting the "<title>" tag from a remote web page. Could somebody please explain the different parts of the preg_match function below? For instance, what are all the
×
×
  • Create New...