Jump to content

garrisonian14

Members
  • Posts

    26
  • Joined

  • Last visited

    Never

Posts posted by garrisonian14

  1. Hi Guys

    I have given facebook share button in CMS to share particular product detail page on facebook, button is fine there.  But when i click on share it gives default title of that page, and some text from its content,

    i have even specified in meta to use dynamic title for each page.

    This is what i have put in <head> of the page i want to share

    But still facebook share popup contains default title and some content of the page.

     

    <meta property="og:title" content="Wecome - <?php echo stripslashes($contest_details['designtype']);?> Contest" />

    <meta property="og:description" content=" <?php echo stripslashes($contest_details['details']);?>" />

    <meta property="og:image" content="<?php echo SITE_URL;?>images/caracter.png" />

    Kindly help on this

     

    Thanks

  2. Hi Friends,

    I am not sure i am looking for help here in right category or not.

    I am integrating paypal with IPN, (i have done this on many websites and never had this issue before.)

     

    I am testing it on sandbox account.

    All the data i am receiving back from paypal is fine. But always IPN verifications fails.

     

    I have used same class on many projects but never got this issue, please guide me, what can be the reason for this issue.

    Need help urgently,

     

    Thanks

     

    This is what i am getting in log file

     

    [10/30/2011 12:15 PM] - FAIL: IPN Validation Failed.

    IPN POST Vars from Paypal:

    mc_gross=525.00, protection_eligibility=Eligible, address_status=confirmed, payer_id=QLJGBWYEGPFWW, tax=0.00, address_street=1 Main St, payment_date=11:15:27 Oct 30, 2011 PDT, payment_status=Completed, charset=windows-1252, address_zip=95131, first_name=Test, mc_fee=15.53, address_country_code=US, address_name=Test User, notify_version=3.4, custom=, payer_status=verified, business=sharaf_1195546587_biz@hotmail.com, address_country=United States, address_city=San Jose, quantity=1, verify_sign=AiPC9BjkCyDFQXbSkoZcgqH3hpacAlUS.f.l0d1.lPU2NAC3pqJbClgv, payer_email=sharaf_1239776872_per@hotmail.com, txn_id=2VC808708R401452A, payment_type=instant, last_name=User, address_state=CA, receiver_email=sharaf_1195546587_biz@hotmail.com, payment_fee=15.53, receiver_id=KN2K54ELKVMV6, txn_type=web_accept, item_name=SLACKER MONK GRAPHICS - Shoes Design, mc_currency=USD, item_number=19%##%1, residence_country=US, test_ipn=1, handling_amount=0.00, transaction_subject=SLACKER MONK GRAPHICS - Shoes Design, payment_gross=525.00, shipping=0.00, ipn_track_id=zLpG8h32fEiFoCdtCglq.w,

    IPN Response from Paypal Server:

    HTTP/1.0 302 Found

     

    Location: https://www.sandbox.paypal.com

     

    Server: BigIP

     

    Connection: close

     

    Content-Length: 0

  3. Hi Friends,

     

    All of you may have seen on websites that we click on a link and it opens pdf document in browser. I want to do same thing but for excel documents. i want to implement it for excel documents i.e. if a user clicks on a link it opens an excel sheet in same browser window.

     

    i tried <a href="test.xls">My sheet</a>. it worked in I.E 7. but it doesn't work in firefox and I.E 6.

     

    Please help me for this implementation. It is very urgent.

     

     

    Thanks,

     

    Ali

  4. Hi,

     

    Can any body tell me how i can implement file upload progress bar which shows upload time/upload size remaining with out using flash uploader. As i have seen many solutions but all of then use flash.

     

    Please it is urgent i am stuck in it for a long time much frustrated now! please help me.

     

    Thanx

  5. Hi,

     

    I am creating xml file using php script. File is generated successfully. But when i view this xml in browser error occurs if there is  –& like things in XML text (in description tag).

     

    Kindly help me it is very urgent. Is this encoding scheme type problem. If anybody knows its solution please guide me.

     

    Thanx in anticipation,

     

    Ali.

  6. Hi all,

     

    I am using following code to create a pdf file and write some text in it using php.

     

    $pdf = pdf_new();

    pdf_open_file($pdf, "terms.pdf");

     

    pdf_begin_page($pdf, 595, 842);

    $arial = pdf_findfont($pdf, "Arial", "host", 1);

    pdf_setfont($pdf, $arial, 10);

     

    pdf_show_xy($pdf,"YES you are right", 50, 750);

    pdf_end_page($pdf);

    pdf_close($pdf);

     

    But i get

    Fatal error: Call to undefined function: pdf_new()

     

    Can anybody please help me how to resolve  this, is there any special library needed to include or some settings in php.ini are required. Kindly guide me....

    Urgent please.

     

    Thanx,

     

    Ali

  7. Hi,

     

    I want to show an alert box With Yes  No Button..

    Like:

    You want to proceed

     

    Yes          No

     

     

    Alert gives just OK, and confirm gives Ok and  Cancel buttons

     

    Kindly tell me how can i get Yes And No buttons there.

     

    It is urgent please....

     

    Thanx,

     

    Ali

  8. hi,

     

    I am using php and javascript. When i click on a link suppose on index.php a popup window say p1 is opened then i click on link which is on pop up p1 at this p1 is closed and a new popup say p2 is opened. Now we fill a form on p2 submit it, on successfull submition i make entries in db, upto this it is working fine . but now i need to close this p2 and refresh index.php page. remember popup1 is already closed so it is difficult to get reference back to index.php.

     

    Can any body please help me how can i do this . I have tried different options but unable to get results. I am not very goood in javascript. Kindly help me it is urgent..

     

    Thanx an anticipation,

     

    Ali.

  9. hi,

    I want to download a text file using php, Can any body please tell me the code. i am using following

     

    $file_path = "terms.txt";

    $path_parts = pathinfo($file_path);

    $fext = $path_parts['extension'];

    $asfname = $path_parts['basename'];

    set_time_limit(0);

     

    //echo "path".$file_path;

    if(!file_exists($file_path))

    {

    die("File does not exist!");

    }

     

    // file size in bytes

    $fsize = filesize($file_path);

     

     

      $mtype = '';

      // mime type is not set, get from server settings

      if (function_exists('mime_content_type'))

      {

    $mtype = mime_content_type($file_path);

      }

      else if (function_exists('finfo_file'))

      {

    $finfo = finfo_open(FILEINFO_MIME); // return mime type

    $mtype = finfo_file($finfo, $file_path);

    finfo_close($finfo); 

      }

     

     

      if ($mtype == '')

      {

        if($fext == "pdf")

      {

    $mtype = 'application/pdf';

      }

      else if($fext == "txt" || $fext == "htm" || $fext == "html")

      {

    $mtype = 'text/html';

      }

    else

      {

    $mtype = "application/force-download";

      }

      }

     

    // set headers

    header("Pragma: public");

    header("Expires: 0");

    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");

    header("Cache-Control: public");

    header("Content-Description: File Transfer");

    header("Content-Type: $mtype");

    header("Content-Disposition: attachment; filename=\"$asfname\"");

    header("Content-Transfer-Encoding: binary");

    header("Content-Length: " . $fsize);

    @readfile($file_path);

     

     

    But instead of downloading the file i am specifying , i downloads source code of the page where this download code is written.

     

    Kindly help me as soon as possible.

     

     

    regards,

    Ali.

  10. Hi,

     

    I am using php.When user clicks on a particular link a pop up window is opened (using javascript window.open method).

    In this window there is a form . on submiting this form we make entries in db. On success of entries i need to close this pop up and refresh the parent window.

    I close the pop up using javascript window.close function. but don't know how to refresh the parent window.

  11. you cannot have <style> tags make them all inline style as in <p style=".."> an an example otherwise they will override your style sheet since it can effect the display in yahoo.. I think yahoo make them <xstyle> not too sure been a long time since I was in emailing stuff

     

    brother, i am already using inline styles. like  <td style="...."> or <table style = "....">

     

  12. all emailing clients handle mail differently yahoo,hotmail,gmail modify your email so it cannnot tamper with their site, are you using any tags which would be overriden, I would suggest view the source code in hotmail pr yahoo and see what has changed from the original email you will find the problem

     

    i have checked source for yahoo, gmail, and hotmail

     

    Yahoo: overrides the styles

    Hotmail : Shows the styles in source as we have written (that's why at the moment our email is fine in hotmail)

    gmail: Does'nt show our html in the sourcel.

     

     

    What should i do now ?

     

     

  13. I am sending an email using php. This email message is in an html template (as newsletter emails are sent). All the styles (CSS) used are written inline. There are also some images used in html to set as background. The behaviour of this html, styles and images is different on gmail,yahoo and hotmail. I have been trying to fix this problem since last two weeks.

    Now it is enough. My  boss is fed up with it. Please help me. Is there any special way to handle template for email to behave it in right way on all email servers.

     

    Kindly help me.

     

    Waiting for your help.

     

    Ali.

  14. an easy way to do this is create an external javascript and put this in it:

     

    
    function myWin(url,puw,puh)
    {
    window.open(url,"thisWin","resizable=no,scrollbars=no,toolbar=no,menubar=no,location=no,status=no,directories=no,fullscreen=no,dependent=no,sreenX=0,screenY=0,top=0,left=0,width="+puw+",height="+puh+"");
    }
    
    

     

    name the js file what ever you want it to be named. for this example, I will name it "popWindows.js".

     

    now then, were ever you want a pop-up window to be; you will do this:

     

    
    <!-- This Loads Your External JS File -->
    <script type="text/javascript" src="popWindows.js"></script>
    
    <!-- 
    **************************************************************
    The myWin Functions Is Set-Up Like This 
    **************************************************************
    
    myWin(url,puw,puh)
    
    url = the web address/url of your pop-up
    puw = the width of your pop-up window
    puh = the height of your pop-up window
    
    -->
    
    <a href="#" onclick="myWin('page1.php','400','325')">Open Window</a>
    
    

     

     

     

    and this should solve you multiplet pop-up issue.

     

     

    Thanx for your help, i have done it

  15. Found this at the PHP manual: (modified for you)

     

    <?php
    function hyperlink ($string) {
    $string = preg_replace('#(^|\s)([a-z]+://([^\s\w/]?[\w/])*)#is', '\\1<a href="\\2">\\2</a>', $string);
    $string = preg_replace('#(^|\s)((www|ftp)\.([^\s\w/]?[\w/])*)#is', '\\1<a href="http://\\2">\\2</a>', $string);
    $string = preg_replace('#(^|\s)(([a-z0-9._%+-]+)@(([.-]?[a-z0-9])*))#is', '\\1<a href="mailto:\\2">\\2</a>', $string);
    return $string;
    }
    ?>

     

    It seems to work for all examples I've tried.

     

    PS I posted the code here --> http://code-bin.homedns.org/63 for permanent reference.

     

    Thanx friend, it is great. Working for me.  So nice of you.

  16. exactly. in any case the http://www.abc.com will turn to www.abc.com which its link again... of course you continue with the code from wes1890. I said add not replace..

     

    sorry if that doesnt satisfy you but my knowledge is limited... i write php just a week ;)

     

     

    I have used it now this one

     

    function hyperlink($text)

    {

    $output_string = "";

    $lala = explode("http://", $text);

    for($i=0; $i<count($lala); $i++)

    {

    $text = $lala[$i];

    $text = ereg_replace("[a-zA-Z]+://([.]?[a-zA-Z0-9_/-])*", "<a href=\"\\0\">\\0</a>", $text);

    // this will match protocol://address/path/

    $text = ereg_replace("(^| |.)(www([.]?[a-zA-Z0-9_/-])*)", "\\1<a href=\"http://\\2\">\\2</a>", $text); // this will match www.something

     

    $output_string .=  $text;

     

    }

     

     

      return $output_string;

    }

     

    it is working except in the case of http://abc.com

     

    now just this problem is left.

     

  17. just add the 2 new lines after {

    for example

     

    function hyperlink($text)

    {

    $lala = explode("http://", $text);

    $text = $lala[1];

    .

    .

    .

     

    But problem is as told earlier that input string will not be just http://www.abc.com . It will be content of a textarea.

    It may be link,

     

    Hello friend, My url is http://www.abc.com and i have many other urls too www.xyz.com . in this case when you explode with http:// and then it will not generate right output string.

  18. You will need to use regular expressions.

     

    Heres ya go:

     

    function hyperlink($text)
    {
      $text = ereg_replace("[a-zA-Z]+://([.]?[a-zA-Z0-9_/-])*", "<a href=\"\\0\">\\0</a>", $text);
      // this will match protocol://address/path/
    
      $text = ereg_replace("(^| |.)(www([.]?[a-zA-Z0-9_/-])*)", "\\1<a href=\"http://\\2\">\\2</a>", $text);
      // this will match www.something
    
      return $text;
    }

     

    And use it like so:

     

    $textarea = hyperlink($textarea);

     

    That should work for ya, ive not tested it though

    Thanx a lot for your help.

    It works fine when we have www.abc.com. But have  one  problem

    When there is http://www.abc.com then its out put is : www.abc.com">http://www.abc.com

    as it replaces the string twice.

     

    first for http:// match and then for www match.

     

    I have not worled over regular expressions that''s why i am unable to fix this problem. Kindly please fix this problem for me. It will be a great favor from your side.

     

    Thanx again.

     

×
×
  • 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.