Jump to content

tyra

Members
  • Posts

    37
  • Joined

  • Last visited

    Never

Everything posted by tyra

  1. Hi! $url = "http://www.youtube.com/watch?feature=player_embedded&v=IwPHy17Iu6E"; I have code if (preg_match("/http:\/\/www.youtube.com\/watch\?v=([0-9a-zA-Z-_]*)(.*)/i", $url, $matches)) { return '<object height="'.$embed_height.'" width="'.$embed_width.'">'. '<param name="movie" value="http://www.youtube.com/v/'.$matches[1].'" />'. '<param name="wmode" value="transparent" />'. '<embed src="http://www.youtube.com/v/'.$matches[1].'&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" height="'.$embed_height.'" width="'.$embed_width.'" />'. '</object>'; } How to remove feature=player_embedded& from $url ?
  2. Hi! CD drive is broken and motherboard doesn't support USB booting. What other options there is ? Does anyone know how to install xp from HDD one partition to other ?
  3. How this video opening and closing is done?
  4. http://www.facebook.com/ads/create/ I uderstand there is PHP get_meta_tags used but how they fech data into feilds and textarea ?
  5. doesn't work for me because $result = imagecopy($targetImage, $sourceImage, 0, 0, $X, $Y, $W, $H); runs it over with black again.
  6. // Create the target image if ( function_exists('imagecreatetruecolor') ) { $targetImage = imagecreate($width, $height); } else { $targetImage = imagecreate($width, $height); } if ( ! is_resource($targetImage) ) { user_error('Cannot initialize new GD image stream', E_USER_NOTICE); return false; } // Copy the source image to the target image if ( $options['method'] == 2 ) { $result = imagecopy($targetImage, $sourceImage, 0, 0, $X, $Y, $W, $H); //imagejpeg($targetImage, $savePath . ( $filename = uniqid() . time() . '.jpg' ) ); } elseif ( function_exists('imagecopyresampled') ) { $result = imagecopyresampled($targetImage, $sourceImage, 0, 0, $X, $Y, $width, $height, $W, $H); //imagejpeg($targetImage, $savePath . ( $filename = uniqid() . time() . '.jpg' ) ); } else { $result = imagecopyresized($targetImage, $sourceImage, 0, 0, $X, $Y, $width, $height, $W, $H); //imagejpeg($targetImage, $savePath . ( $filename = uniqid() . time() . '.jpg' ) ); } if ( ! $result ) { user_error('Cannot resize image', E_USER_NOTICE); return false; } // Free a memory from the source image imagedestroy($sourceImage); // Save the resulting thumbnail return $targetImage; } creates thumbnail with black backround like this but white is needed. what to add and where ?
  7. ok but where do i have to put this var t=setTimeout("alert('I am displayed after 3 seconds!')",3000);
  8. Can someone add 2 second delay for results to display here? simpel post get javascript //post GET var http_request = false; function makeRequest(url, parameters) { http_request = false; if (window.XMLHttpRequest) { // Mozilla, Safari,... http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { // set type accordingly to anticipated content type //http_request.overrideMimeType('text/xml'); http_request.overrideMimeType('text/html'); } } else if (window.ActiveXObject) { // IE try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!http_request) { alert('Cannot create XMLHTTP instance'); return false; } http_request.onreadystatechange = alertContents; http_request.open('GET', url + parameters, true); http_request.send(null); document.getElementById('myspan').innerHTML = '<img src="images/loading.gif" alt="loding...">'; } function alertContents() { if (http_request.readyState == 4) { if (http_request.status == 200) { //alert(http_request.responseText); result = http_request.responseText; document.getElementById('myspan').innerHTML = result; } else { alert('error'); } } } function get(obj) { var getstr = "?"; for (i=0; i<obj.childNodes.length; i++) { if (obj.childNodes[i].tagName == "INPUT") { if (obj.childNodes[i].type == "text") { getstr += obj.childNodes[i].name + "=" + obj.childNodes[i].value + "&"; } } } makeRequest('get.php', getstr); }
  9. Hi! How to dectect RSS content?
  10. tyra

    match help

    so where to put it ?
  11. tyra

    match help

    Exactly those words.
  12. tyra

    match help

    "post" or "topic" comes right after domain.com/
  13. tyra

    match help

    return preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $t1); how to add "post" and "topic" in preg_mach? and how to check them with OR ?
  14. How to submit multiple forms with onchange event ? the goal is php to load them to various varibles. here is javascript.js var AJAXForms = false; var LastField = null; var isIE = false; // on !IE we only have to initialize it once if (window.XMLHttpRequest) { AJAXForms = new XMLHttpRequest(); } function CheckField(field) { if (window.XMLHttpRequest) { // branch for IE/Windows ActiveX version } else if (window.ActiveXObject) { AJAXForms = new ActiveXObject("Microsoft.XMLHTTP"); } AJAXForms.onreadystatechange = processChange; AJAXForms.open("POST", "check.php?op="+field.value); LastField = field.name; AJAXForms.send(null); } function processChange() { if (AJAXForms.readyState == 4) { var res = document.getElementById(LastField); res.innerHTML = AJAXForms.responseText; res.style.visibility = "visible"; } } html <input type="text" name="t0" value="" size="20" OnChange="CheckField(this)" tabindex="1"> <input type="text" name="t1" value="" size="20" OnChange="CheckField(this)" tabindex="1"> <div id="t0" class="message"></div> <div id="t1" class="message"></div> php var_dump ($_GET['op']) ; var_dump ($_GET['t1']); die();
  15. Hi! How to do a form where selected image will get displayes immediately without page loading. my images.php : <?php if(isset($_GET['imagesel'])){ switch($_GET['imagesel']){ case "small": echo "obj.options[obj.options.length] = new Option('../img/1.png','1');\n"; break; case "big": echo "obj.options[obj.options.length] = new Option('../img/2.png','11');\n"; break; case "middle": echo "obj.options[obj.options.length] = new Option('../img/0.png','21');\n"; break; } } ?>
  16. can corn be runned without cpanel or similar hosting user control panel ?
  17. Hi! Is there any ways to automatically execute php file or code once a week without loading it to web browser?
  18. Thanks for replay! woks fine !
  19. foreach ($rss->item as $item) { echo $item->title; } how can i get this output to array? So i can call titles separately like $title[0], $title[1] and so on.
  20. Can you tell me how to write it properly ? if(isset($_POST['button'])) && ($_POST['form'] = !null)){ echo 'choose something'; } else{ echo 'great choice!'; }
  21. if it doesn't contain any value with it, it still does other things.
  22. how to tell php that it check if the choice has made? if(isset($_POST['button'])) if user presses button then he must have choice made othervise echo 'you need to choose something';
  23. holy smokes! That surely isn't something to keep in mind. Can you explain a bit how did you came to this?
×
×
  • 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.