Jump to content

lostnucleus

Members
  • Posts

    90
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

lostnucleus's Achievements

Member

Member (2/5)

0

Reputation

  1. see you have analyzed my problem well , but I dont want flatten array , the whole purpose is to build multi dimensional arrays to mock the directory structure .Arrays inside other just as folder is inside other folder in directory structure.
  2. You have identified my problem well , but just missing one major part of it I want returning array to follow same hierarchy structure as that of direcorty iterator !! children key of array acts as a subfolder !!
  3. @kenrbnsn its an logical problem , i want to convert directory tree into specific array format , which I have showed you with example , code will be written only if there is a solution for this logical problem !!
  4. Hi consider I have following type of directory structure inside /root folder1 -fileName1.1 -folder1.2 --fileName1.2.1 $dirItr = new RecursiveDirectoryIterator('/root'); $itr = new RecursiveIteratorIterator($dirItr); $structure ; // the type of structure i want to build store inside it foreach($itr as $object) { //magic happens here } //in the end I want folowing type of structure $structure = array('label'=>'folder1','children'=>array(array('label'=>'fileName1.1'),array('label'=>'folder1.2','children'=>array(array('label'=>'fileName1.2.1'))))); Importan observations; a)children key is an array which contains arrays of other folder or filename; b) filename does not have children attribute because they are leafs of tree c) a folder without any files will be represented as array('label'=>'emptyFolderName',children=>array()) ; //children attribute with empty array. I wd be really thankfull to the user whoever solved this problem , wasted a month already on it !! thanks in Advance.
  5. kindly update to simply cuz http://www.google.com/trends?q=magento%2Cinterspire%2Czencart%2Coscommerce&ctab=0&geo=all&date=all&sort=0
  6. dude you are still not getting the point it got nothing to do with DOCTYPE , well I can make a php script to do exactly what you want here for 50 bucks.
  7. @r4nd yup return shd be replaced with the var name One particular use of this snippet comes handy with phtmls , where you are coding view part of MVC , <?= isset($this->memberName) ? $this->memberName : 'Welcome Guest'; ?>
  8. the above code is same as if(isset($_POST['testbox'])) { return $_POST['testbox']; }else { return null; } if the code behind ? , returns true then $textbox is set to wat comes just after ? , if it return false then $textbox is set to wat comes after : .
  9. try this $pTagElement = $html->find('div[id=main_content_content] p')->current();
  10. function check() { if (window.top!=window.self) { document.write("<p>This window is not the topmost window! Am I in a frame?</p>") } else { document.write("<p>This window is the topmost window!</p>") } }
  11. by php I mean programatic (automated) , you will need to create a table (url) in database with columns public url , and real url , every public url will have real url assosicated to it ( 1 to 1 relationship) , here real url = your affilate url which you want to hide, you will show public url e.g http://yoursite.com/magic.php?public_url = 12345 when user click on this url , you will do select real_url from url where public_url = 12345 , , now store the real_url , in $real_url return <html> <head> <title>My site name</title> <meta name="description" value="som discription"> <meta nam="keywords" value="apple,oranges"> </head> <frameset rows="100%" border="0"> <frame noresize="noresize" src="<?php echo $real_url ?>"> // <===== <noframes> <body>Sorry your browser does not support frames</body> </noframes> </frameset> </html>
  12. file_get_html() ; takes input argument url , it then loads the webpage identified by this url , as document object model and returns it , using find method it searches for hidden elements and return the result as an array of all the hidden elements found in the loaded dom , then you simply treat that as an array to iterate each single dom element (hidden) , the output will be <input type="hidden" name="session" value="4343"/><input type="hidden" name="boi" value="4343fdf"/><input type="hidden" name="dfdf" value="4df343df"/>
  13. simply declare meta tags <html> <head> <title>My site name</title> <meta name="description" value="som discription"> <meta nam="keywords" value="apple,oranges"> </head> <frameset rows="100%" border="0"> <frame noresize="noresize" src="http://some-affilitat.com/?code=45> <noframes> <body>Sorry your browser does not support frames</body> </noframes> </frameset> </html> meta tags will make your page accessable to google , all you need to do is change src attribute of frame tag using php and then throw the output to the client. and the best part you dnt even need to purchase domain if you can implement all this properly .
×
×
  • 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.