Jump to content

extrovertive

Members
  • Posts

    235
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

extrovertive's Achievements

Regular Member

Regular Member (3/5)

1

Reputation

  1. Not sure if this relates more to PHP or Javascript/jQuery, but is there a way to attach a file to an email client (i.e Outlook), when user click on a link/button? I have a link that generates a PDF and I want it so that, when someone click on a link, it will open up their email client with the PDF already attached, and subject already fill in. I know, you can use <a href="mailto:..." but that only opens up the mail client. I also need to attach a file with a subject fill in. Is this doable with PHP or Javascript?
  2. $text = "wow {one|two|three}fsasfa happy ness"; preg_match('/\b{*+}\b/i', $text, $matches); print_r($matches); Basically, $matches will contain "one|two|three" - but all I got is an array with "}"
  3. Ok, so I got domain.com/index.php?tab=apple domain.com/index.php?tab=orange domain.com/index.php?tab=pear But I want my URL to display domain.com/apple, domain.com/orange, etc instead...can anyone help?
  4. Yes, that would work. http://funny.domainA.com/ would redirect to http://domainB.com/blog/funny Can anyone help?
  5. Ok, I have two domains. Let's say I want http://XXX.domainA.com to go to http://domainB.com/title-goes-here How can I do that using mod_rewrite in the .htacess file for my domainA.com domain? Like, http://funny.domainA.com would then redirect to http://domainB.com/blog/the-title-of-something I know I can create a subdomain on domainA and have a 301 redirect to go to another URL. But I'm wondering if I can just use mod-rewrite for my domainA.com?
  6. Ah thanks. What would be the best method to do this? Use Curl? Use file_get_conents and extract the <img code? But how do I just grab the image URLs only?
  7. Given a link/page, what's the best way to extract all the image urls of it? I know I can use $string = file_get_contents("http://www.domain.com"); and then use regular expression to get all the link of the images. But what if some images are like http://www.domain.com/resources/data.php?=123 It would be quite a difficult challenge to find the ones without the typical .jpg, .gif, or .png extensions. Can anyone show me a simple script to do this?
  8. I have a website where if a user is logged in using http://www, then they won't be logged in when accessing http:// So, how can I use .htaccess so that if someone access http://domain.com/test it will become http://www.domain.com/test
  9. Zend Framework is the best and most flexible one there is. Plus, it's from by Zend, duh!
  10. So, I guess it's more on the hardware issue? Btw, it's a advertisement system where the app/banner will be exposed on big name sites (i.e. myspace, facebook, yahoo, etc) - so yes, we're just preparing in case if your traffic gets that much.
  11. We have a new project for a web app that will display banners ads on websites (as a network) and our estimate is for it to handle 10 to 20 billion impressions a month (yes, billions not millions). Our current language is in ASP...but are moving to PHP. Does PHP 5 has its limit with scaling web application? Or, should I have our team invest in picking up JSP? Or, is the issue a matter of the app server and/or DB? We plan to use Oracle 10g as the database.
  12. Ah ok, thanks. I guess simplexml automatically converts that <test> into an html entity?
  13. I know a final method (i.e. final public function foo(){}) prevents a child class from overriding that method. But can a private method be override in a child class? If so, what's difference does it make between a protected method? What's the difference between making a method final and a method private? Examples?
  14. This code $xml = new SimpleXMLElement('<root></root>'); $temp = $xml->addChild('parent'); $temp = $temp->addChild('test', 'cool'); header('Content-type: text/xml'); echo $xml->asXML(); returns <root> <parent> <test>cool</test> </parent> </root> But I want to insert some text "cool" inside the parent element like this <root> <parent> cool <test>cool</test> </parent> </root> I know you can use PHP DOM (createTextNode) and append the text to the parent element, but is there a simplexml way of doing it?
×
×
  • 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.