Passing resource value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manuitpro
    New Member
    • Dec 2009
    • 13

    Passing resource value

    I have been strugling to find a solution for last two weeks.

    Is there any way to pass a resource(fsocko pen()) value to another page by any of the method available in php.

    Thanks
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    No. The connection made by fsockopen is closed when the script ends.

    You could check out pfsockopen. It works exactly like fsockopen, except that the connection is kept open after the PHP script ends. Which - in theory - allows you to re-connect to the same resource by calling the function again in a new request, using the same parameters. - It's a bit more complicated though, and it may not work as expected on some web-servers.

    You could always try do create a background script to manage the resources, that you would call from your web-scripts, but that's an entirely different problem.

    Comment

    • manuitpro
      New Member
      • Dec 2009
      • 13

      #3
      Thanks for your reply,

      I am new to php, can u please help me to create background script to access resource in php.

      Comment

      Working...